/* /ai hub — page-only styles on top of /css/style.css */

.sub {
	color: var(--dim);
	margin: 28px 0 10px;
	font-weight: 500;
}

/* Benchmark card */
.bench {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 0;
	border: 1px solid var(--line-2);
	border-top: 0;
	background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.bench__main {
	padding: 22px;
	border-right: 1px solid var(--line-2);
}
.bench__top {
	display: flex;
	justify-content: space-between;
	color: var(--c);
}
.bench h3 {
	font-family: var(--cond);
	font-weight: 700;
	font-size: 38px;
	line-height: 1.05;
	text-transform: uppercase;
	margin: 10px 0 12px;
}
.bench h3 a:hover {
	color: var(--c);
}
.bench p {
	color: var(--fg-2);
	max-width: 62ch;
}
.bench__facts {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-top: 20px;
	border: 1px solid var(--line-2);
}
.bench__facts div {
	padding: 10px 12px;
	border-right: 1px solid var(--line);
}
.bench__facts div:last-child {
	border-right: 0;
}
.bench__facts dt {
	color: var(--dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 11px;
}
.bench__facts dd {
	color: var(--fg);
	font-size: 15px;
	margin-top: 2px;
}
.bench__board {
	border: 0;
	background: transparent;
	display: flex;
	flex-direction: column;
}
.board {
	list-style: none;
	flex: 1;
}
.board li {
	position: relative;
	display: grid;
	grid-template-columns: 28px 1fr auto;
	gap: 2px 12px;
	align-items: baseline;
	padding: 12px 14px 14px;
	border-bottom: 1px solid var(--line);
}
.board__rk {
	color: var(--dim);
	grid-row: span 2;
}
.board__nm {
	font-family: var(--cond);
	font-weight: 600;
	font-size: 19px;
}
.board__nm i {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: var(--c);
	transform: rotate(45deg);
	margin-right: 10px;
	vertical-align: 2px;
}
.board__sc {
	font-size: 20px;
	color: var(--fg);
	grid-row: span 2;
	align-self: center;
}
.board__meta {
	color: var(--dim);
	grid-column: 2;
}
.board__bar {
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 2px;
	width: var(--w);
	background: var(--c);
}
.board__empty {
	padding: 16px 14px;
}
.board__empty a {
	color: var(--cyan);
}
.board__note {
	padding: 10px 14px;
}

@media (max-width: 900px) {
	.bench {
		grid-template-columns: 1fr;
	}
	.bench__main {
		border-right: 0;
		border-bottom: 1px solid var(--line-2);
		padding: 18px 14px;
	}
	.bench h3 {
		font-size: 30px;
	}
	.bench__facts {
		grid-template-columns: 1fr 1fr;
	}
	.bench__facts div:nth-child(2) {
		border-right: 0;
	}
	.bench__facts div:nth-child(-n + 2) {
		border-bottom: 1px solid var(--line);
	}
	.board li {
		padding: 12px;
	}
	.board__nm {
		font-size: 17px;
	}
}

/* ============================================================
   Logo tiles
   ============================================================ */
.logo {
	--size: 36px;
	flex: none;
	display: inline-grid;
	place-items: center;
	width: var(--size);
	height: var(--size);
	border-radius: 7px;
	background: var(--bg);
	box-shadow: inset 0 0 0 1px #ffffff14;
	overflow: hidden;
}
.logo img {
	width: calc(var(--size) * (1 - 2 * var(--pad)));
	height: calc(var(--size) * (1 - 2 * var(--pad)));
	object-fit: contain;
}
.logo--w,
image.logo--w {
	filter: brightness(0) invert(1);
}
.logo--lg {
	--size: 52px;
	border-radius: 10px;
}
.logo--xl {
	--size: 76px;
	border-radius: 14px;
	box-shadow: 0 0 0 1px var(--line-2), 0 0 40px -6px color-mix(in srgb, var(--cyan) 45%, transparent);
}

/* ============================================================
   Setup visuals
   ============================================================ */
.viz {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	border: 1px solid var(--line-2);
	border-top: 0;
	background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.viz__panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.viz__panel + .viz__panel {
	border-left: 1px solid var(--line-2);
}
.viz__note {
	margin-top: auto;
	padding: 12px 16px 16px;
	color: var(--fg-2);
	font-size: 14.5px;
	border-top: 1px solid var(--line);
}

/* wires shared by both visuals: a dashed line that flows */
@keyframes flow {
	to {
		stroke-dashoffset: -20;
	}
}
.hub__wires path,
.net .wire {
	fill: none;
	stroke-width: 1.5;
	stroke-dasharray: 4 6;
	animation: flow 1.1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
	.hub__wires path,
	.net .wire {
		animation: none;
	}
}

/* One interface: T3 Code → agents */
.hub {
	display: grid;
	grid-template-columns: 128px minmax(40px, 1fr) minmax(0, 2.4fr);
	align-items: stretch;
	padding: 18px 16px;
	min-height: 330px;
}
.hub__src {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
}
.hub__src b {
	font-family: var(--cond);
	font-weight: 700;
	font-size: 20px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.hub__wires {
	width: 100%;
	height: 100%;
	overflow: visible;
}
.hub__wires path {
	stroke: var(--c);
	vector-effect: non-scaling-stroke;
	opacity: 0.8;
}
.hub__dst {
	list-style: none;
	display: grid;
	grid-auto-rows: 1fr;
}
.hub__dst li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0 6px 10px;
	border-left: 2px solid var(--c);
	min-width: 0;
}
.hub__txt {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.hub__txt b {
	font-family: var(--cond);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.15;
}
.hub__txt .mono {
	font-size: 11px;
	overflow-wrap: anywhere;
}

/* Every device */
.net {
	padding: 10px 12px 0;
}
.net svg {
	display: block;
	width: 100%;
	height: auto;
}
.net__tall {
	display: none !important;
}
.net .wire {
	stroke: var(--cyan);
	opacity: 0.75;
}
.net .wire--link {
	stroke: var(--amber);
	stroke-dasharray: 2 5;
}
.net .wire--peer {
	stroke: var(--fg-2);
	opacity: 0.35;
	stroke-dasharray: 2 6;
	animation-duration: 2.4s;
}
.dev__t3 rect {
	fill: #fff;
	stroke: var(--bg);
	stroke-width: 2;
}
.viz__note a {
	color: var(--cyan);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.dev__icon {
	fill: none;
	stroke: var(--fg-2);
	stroke-width: 1.3;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.dev__icon.is-host {
	stroke: var(--cyan);
}
.dev__plate {
	fill: var(--panel-2);
	stroke: var(--line-2);
	stroke-width: 0.6;
}
.dev__icon.is-host .dev__plate {
	stroke: color-mix(in srgb, var(--cyan) 55%, transparent);
}
.dev__name {
	fill: var(--fg);
	font: 600 15px var(--cond);
}
.dev__role {
	fill: var(--dim);
	font: 400 10.5px var(--mono);
}
.net__tall .dev__name {
	font-size: 13.5px;
}
.dev__tag {
	fill: var(--amber);
	font: 400 10.5px var(--mono);
}

/* ============================================================
   Models
   ============================================================ */
.mtbl {
	border: 1px solid var(--line-2);
	border-top: 0;
}
.mdl__in {
	display: flex;
	align-items: center;
	gap: 14px;
	white-space: nowrap;
}
.mdl__in > span:last-child {
	display: flex;
	flex-direction: column;
}
.mtbl .mdl b {
	font-family: var(--cond);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.1;
}
.mtbl td {
	vertical-align: middle;
}
.chip {
	display: inline-block;
	font: 500 12px var(--mono);
	padding: 3px 8px;
	margin: 2px 6px 2px 0;
	border: 1px solid var(--line-2);
	color: var(--fg);
	background: var(--panel-2);
}
.eff {
	display: inline-block;
	font: 600 12px var(--mono);
	padding: 3px 8px;
	border: 1px solid currentColor;
	letter-spacing: 0.02em;
}
.eff--high {
	color: var(--cyan);
}
.eff--xhigh {
	color: var(--amber);
}
.eff--max {
	color: var(--magenta);
}

/* ============================================================
   High Council
   ============================================================ */
.council {
	border: 1px solid var(--line-2);
	border-top: 0;
	background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.council__about {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 24px;
	align-items: center;
	padding: 22px;
	border-bottom: 1px solid var(--line);
}
.council__about p {
	color: var(--fg-2);
	max-width: 66ch;
}
.council__about p b {
	color: var(--fg);
	font-weight: 600;
}
.council__steps {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 11px;
}
.council__steps li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border: 1px solid var(--line-2);
	color: var(--fg);
}
.council__steps li span {
	color: var(--amber);
}
.council__steps li.loop {
	border-style: dashed;
	color: var(--amber);
}
.seats {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
	gap: 14px;
	padding: 48px 22px 26px;
	/* faint arc behind the seats */
	background: radial-gradient(60% 120% at 50% 120%, color-mix(in srgb, var(--amber) 9%, transparent), transparent 70%);
}
.seat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	padding: 18px 10px 16px;
	border: 1px solid var(--line-2);
	border-top: 2px solid var(--amber);
	background: var(--panel);
	transform: translateY(calc(var(--lift) * -1));
}
.seat__no {
	color: var(--amber);
	font-size: 11px;
	margin-bottom: 4px;
}
.seat b {
	font-family: var(--cond);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.15;
	margin-top: 6px;
}
.seat .eff {
	margin-top: 6px;
}

/* ============================================================
   Lab standings
   ============================================================ */
.labs {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(var(--rows, 5), auto);
	grid-auto-flow: column;
	border: 1px solid var(--line-2);
	border-top: 0;
	background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.lab {
	--rk: var(--dim);
	display: grid;
	grid-template-columns: 52px auto 1fr auto;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--line);
}
.lab--c2 {
	border-left: 1px solid var(--line-2);
}
.lab--end {
	border-bottom: 0;
}
.lab__rk {
	font-size: 26px;
	font-weight: 600;
	color: var(--rk);
	line-height: 1;
}
.lab--1 {
	--rk: #ffc94a;
}
.lab--2 {
	--rk: #c8d3df;
}
.lab--3 {
	--rk: #d98a55;
}
.lab--top {
	background: linear-gradient(90deg, color-mix(in srgb, var(--rk) 9%, transparent), transparent 60%);
}
.lab__nm {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.lab__nm b {
	font-family: var(--cond);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.15;
}
.lab__tags {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.lab__tags .chip {
	margin: 0;
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.chip--use {
	color: var(--violet);
	border-color: color-mix(in srgb, var(--violet) 50%, transparent);
}
.chip--council {
	color: var(--amber);
	border-color: color-mix(in srgb, var(--amber) 50%, transparent);
}
.labs__note {
	margin-top: 10px;
}

/* ============================================================
   Narrow screens
   ============================================================ */
@media (max-width: 1080px) {
	.viz {
		grid-template-columns: 1fr;
	}
	.viz__panel + .viz__panel {
		border-left: 0;
		border-top: 1px solid var(--line-2);
	}
}
@media (max-width: 900px) {
	.hub {
		grid-template-columns: 84px minmax(28px, 0.6fr) minmax(0, 3fr);
		padding: 14px 10px;
		min-height: 300px;
	}
	.hub__src b {
		font-size: 16px;
	}
	.hub__src .logo--xl {
		--size: 60px;
	}
	.hub__dst li {
		gap: 10px;
	}
	.hub__dst .logo {
		--size: 30px;
	}
	.net__wide {
		display: none !important;
	}
	.net__tall {
		display: block !important;
		max-width: 380px;
		margin: 0 auto;
	}
	.mtbl tr.row {
		grid-template-columns: 1fr auto;
		align-items: center;
	}
	.mtbl .effort {
		grid-row: 1;
		grid-column: 2;
		text-align: right;
	}
	.mtbl .roles {
		grid-column: 1 / -1;
	}
	.mtbl .mdl b {
		font-size: 18px;
	}
	.council__about {
		grid-template-columns: 1fr;
		padding: 16px 14px;
	}
	.seats {
		grid-template-columns: 1fr;
		padding: 16px 14px;
		gap: 8px;
	}
	.seat {
		transform: none;
		flex-direction: row;
		flex-wrap: wrap;
		text-align: left;
		padding: 12px;
		column-gap: 12px;
		border-top-width: 1px;
		border-left: 2px solid var(--amber);
	}
	.seat .logo--lg {
		--size: 40px;
		order: -1;
	}
	.seat b {
		margin-top: 0;
		flex: 1;
		min-width: 0;
	}
	.seat__no {
		display: none;
	}
	.seat .mono.dim {
		display: none;
	}
	.seat .eff {
		margin-top: 0;
	}
	.labs {
		grid-template-columns: 1fr;
		grid-auto-flow: row;
		grid-template-rows: none;
	}
	.lab {
		grid-template-columns: 38px auto 1fr auto;
		padding: 12px 14px;
		gap: 12px;
	}
	.lab--c2 {
		border-left: 0;
	}
	.lab--end {
		border-bottom: 1px solid var(--line);
	}
	.lab:last-child {
		border-bottom: 0;
	}
	.lab__rk {
		font-size: 20px;
	}
}

/* ============================================================
   Council skill modal
   ============================================================ */
.council__get {
	margin-top: 14px;
	grid-column: -2 / -1;
	justify-self: end;
}
.skill {
	width: min(920px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 1px solid var(--line-2);
	border-top: 2px solid var(--amber);
	background: var(--panel);
	color: var(--fg);
	flex-direction: column;
}
.skill[open] {
	display: flex;
}
.skill::backdrop {
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: blur(4px);
}
.skill__h {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 20px 10px;
}
.skill__h h2 {
	font-family: var(--cond);
	font-weight: 700;
	font-size: 30px;
	margin-top: 6px;
}
.skill__h h2 .mono {
	font-size: 13px;
	font-weight: 400;
	margin-left: 8px;
}
.skill__x {
	width: 34px;
	height: 34px;
	border: 1px solid var(--line-2);
	background: transparent;
	color: var(--fg);
}
.skill__x:hover {
	color: var(--amber);
	border-color: var(--amber);
}
.skill__how {
	padding: 0 20px 14px;
	color: var(--fg-2);
	font-size: 14.5px;
}
.skill__how code {
	font: 12.5px var(--mono);
	color: var(--amber);
	background: var(--panel-2);
	border: 1px solid var(--line);
	padding: 1px 5px;
}
.skill__code {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 14px 20px;
	overflow: auto;
	background: #070a0e;
	border-top: 1px solid var(--line-2);
	border-bottom: 1px solid var(--line-2);
	font: 12.5px/1.6 var(--mono);
	color: var(--fg-2);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.skill__f {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 12px 20px 16px;
}
.skill__f .btns {
	margin-top: 0;
}
@media (max-width: 900px) {
	.skill {
		width: 100vw;
		max-width: 100vw;
		max-height: 100dvh;
		height: 100dvh;
		margin: 0;
		border: 0;
		border-top: 2px solid var(--amber);
	}
	.skill__h,
	.skill__how,
	.skill__code,
	.skill__f {
		padding-left: 14px;
		padding-right: 14px;
	}
}
