/* Yannis Bench Core — uses Kadence palette variables with fallbacks. */

.yb-muted { color: var(--global-palette5, #6b7280); font-size: 0.9em; }

.yb-model { padding: 2rem 0 4rem; }
.yb-crumbs { font-size: 0.9em; margin-bottom: 0.25rem; }
.yb-crumbs a { text-decoration: none; }
.yb-model-title { margin: 0 0 0.25rem; }
.yb-hero { margin: 1.5rem 0; }
.yb-hero img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 6px; }
.yb-model-intro { max-width: 70ch; }

.yb-section { margin-top: 3rem; }
.yb-section > h2 { border-bottom: 1px solid var(--global-gray-400, #d1d5db); padding-bottom: 0.4rem; }

.yb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.yb-chips a {
	display: inline-block; padding: 0.3rem 0.8rem; border-radius: 999px; text-decoration: none;
	border: 1px solid var(--global-palette1, #2b6cb0);
}

.yb-posts { display: grid; gap: 1.5rem; }
.yb-post { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: start; }
.yb-post-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.yb-post-body h3 { margin: 0.2rem 0 0.4rem; }
.yb-post-body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
	.yb-post { grid-template-columns: 1fr; }
}

.yb-doc-group { font-size: 1.05em; margin: 1.25rem 0 0.5rem; }
.yb-docs { list-style: none; margin: 0; padding: 0; }
.yb-docs li { padding: 0.5rem 0; border-bottom: 1px solid var(--global-gray-400, #e5e7eb); }
.yb-docs .yb-muted { margin-left: 0.5rem; }
.yb-doc-desc { font-size: 0.9em; margin-top: 0.25rem; }

.yb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.yb-gallery figure { margin: 0; }
.yb-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.yb-gallery figcaption { font-size: 0.85em; margin-top: 0.3rem; }

.yb-model-box {
	margin-top: 2.5rem; padding: 1rem 1.25rem; border-radius: 6px;
	background: var(--global-palette7, #f3f4f6);
}

.yb-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.yb-index h3 { margin-top: 0; }
.yb-index ul { margin: 0; padding-left: 1.1rem; }
.yb-index ul ul { font-size: 0.9em; }

/* Board viewer (top/bottom PCB, synced zoom) */
.yb-board { margin: 2rem 0; }
.yb-board-toolbar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 0.5rem 1rem; margin-bottom: 0.5rem; font-size: 0.85em;
}
.yb-board-hint { color: var(--global-palette5, #6b7280); }
.yb-board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.yb-board-tools button {
	font: inherit; line-height: 1.2; padding: 0.25rem 0.65rem; border-radius: 4px; cursor: pointer;
	border: 1px solid currentColor; background: transparent; color: inherit;
}
.yb-board-tools button[aria-pressed="true"] {
	background: var(--global-palette1, #2b6cb0); border-color: transparent; color: #fff;
}
.yb-board-level { min-width: 2.6em; text-align: center; font-variant-numeric: tabular-nums; }
.yb-board-opacity { display: none; width: 110px; }
.yb-board.is-xray .yb-board-opacity { display: inline-block; }
.yb-board.is-xray [data-act="flip"],
.yb-board.is-xray .yb-board-view.is-bottom { display: none; }

.yb-board-views { display: grid; gap: 0.75rem; }
.yb-board.is-side .yb-board-views { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
	.yb-board.is-side .yb-board-views { grid-template-columns: 1fr; }
}
.yb-board-label {
	display: block; margin-bottom: 0.25rem;
	font-size: 0.8em; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.yb-board-note { font-weight: 400; text-transform: none; letter-spacing: 0; }
.yb-board-stage {
	position: relative; overflow: hidden; line-height: 0; border-radius: 4px;
	background: #111; cursor: crosshair; -webkit-user-select: none; user-select: none;
}
.yb-board-stage.is-flipped { transform: scaleX(-1); }
.yb-board-zoom { position: relative; }
.yb-board-zoom img { display: block; width: 100%; max-width: none; height: auto; -webkit-user-drag: none; }
.yb-board-xray { display: none; position: absolute; inset: 0; opacity: var(--yb-xray, 0.5); pointer-events: none; }
.yb-board-xray.is-mirrored { transform: scaleX(-1); }
.yb-board-xray img { width: 100%; height: 100%; }
.yb-board.is-xray .yb-board-xray { display: block; }
.yb-board-cross {
	display: none; position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px;
	border: 2px solid #ff3b30; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
	pointer-events: none;
}
.yb-board.is-zooming .yb-board-cross { display: block; }
.yb-board.is-touch-zoom .yb-board-stage { touch-action: none; outline: 2px solid var(--global-palette1, #2b6cb0); }
.yb-board figcaption { margin-top: 0.5rem; font-size: 0.85em; }

/* "Zoom on hover" style for core Image blocks */
.wp-block-image.is-style-zoom img { cursor: zoom-in; }

/* "Specifications & history" button on model pages */
.yb-details-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.25rem 0 0; }
