/* ==========================================================================
   Career.base — モーダル（機能詳細／テストユース詳細）
   値は design/visual/project/FeatureModal-* / TestUseModal-*。
   <dialog> の showModal() で開くモーダル。画面の縁に余白を残して中央に表示する。
   ========================================================================== */

.cb-modal {
	--cb-modal-gap-x: 12px;
	--cb-modal-gap-y: 16px;
	position: fixed;
	inset: 0;
	width: calc(100% - var(--cb-modal-gap-x) * 2);
	max-width: none;
	height: calc(100% - var(--cb-modal-gap-y) * 2);
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--radius-card);
	box-shadow: 0 24px 64px rgba(13, 47, 75, .28);
	background: var(--white);
	color: var(--ink);
	overflow: hidden;
}

.cb-modal[open] {
	display: flex;
	flex-direction: column;
	animation: cb-modal-in .2s ease-out;
}

.cb-modal::backdrop {
	background: rgba(13, 47, 75, .4);
}

@keyframes cb-modal-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.cb-modal--feature {
	background: var(--soft);
}

.cb-modal__close {
	position: absolute;
	top: 20px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--deep);
	border: 1.5px solid var(--deep);
	border-radius: 10px;
	box-shadow: 0 6px 16px rgba(18, 63, 99, .24);
	color: var(--white);
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}

.cb-modal__close:hover {
	background: var(--deep-2);
	border-color: var(--deep-2);
}

.cb-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cb-modal__footer {
	flex: 0 0 auto;
	background: var(--soft);
}

@media (min-width: 768px) {
	.cb-modal {
		--cb-modal-gap-x: 40px;
		--cb-modal-gap-y: 40px;
		max-width: 1320px;
	}

	.cb-modal__close {
		top: 40px;
		right: 48px;
		width: 46px;
		height: 46px;
	}

	.cb-modal--testuse .cb-modal__close {
		top: 36px;
	}
}

/* ---------- 機能詳細 ---------- */

.cb-fm {
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: var(--inner-max);
	margin: 0 auto;
	padding: 70px 20px 28px;
}

.cb-fm__top {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.cb-fm__media {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 842 / 486;
	object-fit: cover;
	object-position: 0 0;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 14px;
}

.cb-fm__label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.cb-fm__num,
.cb-fm__ba-label {
	color: var(--mid);
	font-size: calc(10.5px + 1.5 * var(--fl));
	font-weight: 600;
	letter-spacing: .12em;
}

.cb-fm__title {
	margin-bottom: 10px;
	color: var(--ink);
	font-size: calc(20px + 10 * var(--fl));
	font-weight: 700;
	line-height: 1.45;
}

.cb-fm__title:focus {
	outline: none;
}

.cb-fm__summary {
	margin-bottom: 8px;
	color: var(--deep);
	font-size: calc(15px + 3 * var(--fl));
	font-weight: 700;
	line-height: 1.6;
}

.cb-fm__desc {
	color: var(--ink-soft);
	font-size: calc(13.5px + 1.5 * var(--fl));
	line-height: 1.85;
}

.cb-fm__ba-head {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
}

.cb-fm__ba-label {
	font-family: var(--font-en);
}

.cb-fm__ba-title {
	color: var(--deep);
	font-size: calc(16px + 2 * var(--fl));
	font-weight: 700;
}

.cb-fm__ba-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cb-fm__ba-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.cb-fm__pain,
.cb-fm__solution {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 12px;
}

.cb-fm__pain {
	background: var(--white);
	border: 1.5px solid var(--line);
}

.cb-fm__solution {
	background: var(--deep);
}

.cb-fm__avatar,
.cb-fm__solution-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
}

.cb-fm__avatar {
	border-radius: 50%;
	object-fit: cover;
}

.cb-fm__solution-icon {
	object-fit: contain;
}

.cb-fm__ba-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.cb-fm__ba-body p {
	color: var(--ink);
	font-size: calc(13.5px + 1 * var(--fl));
	font-weight: 500;
	line-height: 1.7;
}

.cb-fm__solution .cb-fm__ba-body p {
	color: var(--white);
}

.cb-fm__pill {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 4px;
	padding: 3px 9px;
	background: var(--soft);
	border-radius: 999px;
	color: var(--deep);
	font-size: calc(10.5px + 1 * var(--fl));
	font-weight: 700;
}

.cb-fm__pill--solution {
	background: var(--yellow);
}

.cb-fm__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 0;
	color: var(--mid);
}

.cb-fm__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: var(--inner-max);
	margin: 0 auto;
	padding: 16px 0 24px;
	border-top: 1px solid var(--line);
}

.cb-modal__footer {
	padding: 0 20px;
}

.cb-fm__nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--deep);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

@media (hover: hover) and (min-width: 768px) {
	.cb-fm__nav-btn:not(:disabled):hover {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

.cb-fm__nav-btn:disabled {
	opacity: .35;
	cursor: default;
}

@media (min-width: 768px) {
	.cb-fm {
		display: block;
		padding: 64px 64px 32px;
	}

	.cb-fm__top {
		flex-direction: row;
		align-items: center;
		gap: calc(32px + 24 * var(--fl));
	}

	.cb-fm__media-wrap,
	.cb-fm__text {
		flex: 1 1 0;
		min-width: 0;
	}

	.cb-fm__label {
		gap: 10px;
		margin-bottom: 14px;
	}

	.cb-fm__title {
		margin-bottom: 16px;
		line-height: 1.5;
	}

	.cb-fm__summary {
		margin-bottom: 12px;
	}

	.cb-fm__desc {
		line-height: 1.9;
	}

	.cb-fm__ba {
		margin-top: 56px;
	}

	.cb-fm__ba-head {
		flex-direction: row;
		align-items: baseline;
		gap: 14px;
		margin-bottom: 16px;
	}

	.cb-fm__ba-list {
		gap: 12px;
	}

	.cb-fm__ba-row {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
	}

	.cb-fm__pain,
	.cb-fm__solution {
		gap: 16px;
		padding: 18px 20px;
		border-radius: 14px;
	}

	.cb-fm__avatar,
	.cb-fm__solution-icon {
		width: 64px;
		height: 64px;
	}

	.cb-fm__ba-body {
		gap: 8px;
	}

	.cb-fm__pill {
		gap: 5px;
		padding: 3px 10px;
	}

	.cb-fm__arrow {
		padding: 0;
	}

	.cb-modal__footer {
		padding: 0 64px;
	}

	.cb-fm__nav {
		max-width: calc(var(--inner-max) - 128px);
		padding: 24px 0 32px;
	}

	.cb-fm__nav-btn {
		gap: 8px;
		font-size: 14px;
	}
}

/* ---------- テストユース詳細 ---------- */

.cb-tum__head {
	flex: 0 0 auto;
	width: 100%;
	max-width: var(--inner-max);
	margin: 0 auto;
	padding: 24px 20px 0;
}

.cb-tum__eyebrow {
	margin-bottom: 8px;
}

.cb-tum__title {
	margin-bottom: 16px;
	padding-right: 56px;
	color: var(--ink);
	font-size: calc(20px + 6 * var(--fl));
	font-weight: 700;
	line-height: 1.5;
}

.cb-tum__title:focus {
	outline: none;
}

.cb-tum__tabs {
	display: flex;
	border-bottom: 1px solid var(--line);
}

.cb-tum__tab {
	flex: 1;
	min-height: 44px;
	padding: 10px 12px;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	text-align: left;
	cursor: pointer;
}

.cb-tum__tab[aria-selected="true"] {
	border-bottom-color: var(--deep);
}

.cb-tum__tab-study {
	display: block;
	color: var(--tab-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
}

.cb-tum__tab-name {
	display: block;
	color: var(--ink-soft);
	font-size: calc(13px + 2 * var(--fl));
	font-weight: 700;
}

.cb-tum__tab[aria-selected="true"] .cb-tum__tab-study {
	color: var(--mid);
}

.cb-tum__tab[aria-selected="true"] .cb-tum__tab-name {
	color: var(--deep);
}

.cb-tum__body {
	max-width: var(--inner-max);
	margin: 0 auto;
	padding: 24px 20px 40px;
}

.cb-tum__panel:focus-visible {
	outline-offset: 6px;
}

.cb-tum__panel .cb-study-meta {
	margin-bottom: 24px;
}

.cb-tum__grid {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-bottom: 28px;
}

.cb-tum__donuts {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.cb-tum__highlight {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 24px;
	padding: 18px 20px;
	background: var(--soft);
	border-radius: 12px;
	color: var(--ink);
	font-size: calc(13.5px + .5 * var(--fl));
	line-height: 1.75;
}

.cb-tum__highlight-kpi {
	flex-shrink: 0;
	font-size: calc(26px + 6 * var(--fl));
}

.cb-tum__voices-title {
	margin-bottom: 12px;
}

.cb-tum__voices {
	display: grid;
	gap: 10px;
}

.cb-tum__note {
	margin-top: 24px;
	color: var(--note);
	font-size: 11.5px;
	line-height: 1.7;
}

@media (min-width: 768px) {
	.cb-tum__head {
		padding: 40px 64px 0;
	}

	.cb-tum__eyebrow {
		margin-bottom: 10px;
	}

	.cb-tum__title {
		margin-bottom: 20px;
	}

	.cb-tum__tab {
		padding: 14px 20px;
	}

	.cb-tum__body {
		padding: 32px 64px 56px;
	}

	.cb-tum__voices {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}

	.cb-tum__highlight {
		flex-wrap: nowrap;
		margin-top: 28px;
		padding: 20px 24px;
	}
}

@media (min-width: 1024px) {
	.cb-tum__grid {
		display: grid;
		grid-template-columns: 280px minmax(0, 1fr);
		align-items: start;
		gap: 56px;
		margin-bottom: 36px;
	}

	.cb-tum__donuts {
		gap: 28px;
	}
}

/* 横棒グラフ */

.cb-bars {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cb-bars__row {
	display: grid;
	grid-template-areas:
		"label value"
		"track track";
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 6px 10px;
}

.cb-bars__label {
	grid-area: label;
	color: var(--ink);
	font-size: calc(13px + .5 * var(--fl));
	line-height: 1.5;
}

.cb-bars__track {
	grid-area: track;
	display: block;
	height: 10px;
	overflow: hidden;
	background: var(--soft);
	border-radius: 4px;
}

.cb-bars__fill {
	display: block;
	height: 100%;
	background: var(--sky-deep);
	border-radius: 4px;
}

.cb-bars__row.is-highlight .cb-bars__fill {
	background: var(--deep);
}

.cb-bars__value {
	grid-area: value;
	white-space: nowrap;
	text-align: right;
}

.cb-bars__pct {
	color: var(--deep);
	font-size: calc(14px + .5 * var(--fl));
	font-weight: 700;
}

.cb-bars__count {
	margin-left: 6px;
	color: var(--ink-soft);
	font-size: calc(12px + .5 * var(--fl));
}

@media (min-width: 768px) {
	.cb-bars__row {
		grid-template-areas: "label track value";
		grid-template-columns: 130px minmax(0, 1fr) 112px;
		align-items: center;
		gap: 14px;
	}

	.cb-bars__track {
		height: 14px;
	}

	.cb-bars--wide {
		gap: 16px;
	}

	.cb-bars--wide .cb-bars__row {
		grid-template-columns: minmax(0, 330px) minmax(80px, 1fr) 112px;
	}

	.cb-bars--wide .cb-bars__track {
		height: 20px;
	}
}
