/* ===================
   디자인 토큰 (리뉴얼 2026-09-29, member-ui-renewal P1)
   모든 단원 화면이 가장 먼저 싣는 파일이다. 색 토큰(--fxt-ink 등)은 team-settings.css/team-app.css가
   여전히 정의한다 — 여기서는 그 파일들이 건드리지 않는 값만 정의한다: 웹폰트, 간격 스케일, radius 스케일,
   컨트롤 높이 스케일. 화면 CSS는 이제부터 새 값을 직접 쓰지 않고 아래 변수만 쓴다(specs 2-5).
   =================== */

/* ===================
   1. Pretendard Variable 웹폰트 (자체 호스팅)
   전에는 --fxt-font 가 "Pretendard Variable"을 가리켰지만 @font-face가 없어 항상 시스템 폴백(맑은 고딕)으로
   그려졌다. 파일은 fluxhub-site-admin 플러그인이 이미 쓰는 것과 같은 파일이다(중복 배포, 팀별 플러그인은
   서로의 자산 폴더를 참조하지 않는다 — 원칙 9).
   =================== */
@font-face {
	font-family: "Pretendard Variable";
	src: url("../fonts/PretendardVariable.woff2") format("woff2-variations"), url("../fonts/PretendardVariable.woff2") format("woff2");
	font-weight: 45 920;
	font-style: normal;
	font-display: swap;
}

/* ===================
   2. 간격 스케일 (4px 배수만 — specs 2-5)
   =================== */
.fxt-page {
	--fxt-sp-1: var(--kc-sp-1, 4px);
	--fxt-sp-2: var(--kc-sp-2, 8px);
	--fxt-sp-3: var(--kc-sp-3, 12px);
	--fxt-sp-4: var(--kc-sp-4, 16px);
	--fxt-sp-5: var(--kc-sp-5, 20px);
	--fxt-sp-6: var(--kc-sp-6, 24px);
	--fxt-sp-8: var(--kc-sp-8, 32px);
	--fxt-sp-10: var(--kc-sp-10, 40px);
	--fxt-sp-12: var(--kc-sp-12, 48px);
	--fxt-sp-16: var(--kc-sp-16, 64px);

	/* radius 스케일 6종만(specs 2-5) — 기존 --fxt-radius/--fxt-radius-sm(16/12)는 남겨 두되(다른 화면이
	   아직 참조한다) 새 화면은 아래 --fxt-r-* 만 쓴다. */
	--fxt-r-xs: 4px;
	--fxt-r-sm: 8px;
	--fxt-r-md: 12px;
	--fxt-r-lg: 16px;
	--fxt-r-xl: 24px;
	--fxt-r-pill: 999px;

	/* 컨트롤 높이 3단(specs 2-5·2-10): 버튼·입력·탭. */
	--fxt-h-sm: 32px;
	--fxt-h-md: 40px;
	--fxt-h-lg: 48px;

	/* 중립 강조(active/hover) — 치지직처럼 색이 아니라 명도로 강조한다(specs 2-2·2-9).
	   다크·라이트 어느 배경에서도 같은 방향으로 작동하도록 대비색 혼합을 쓴다. */
	--fxt-tint-weak: color-mix(in srgb, var(--fxt-ink) 6%, transparent);
	--fxt-tint: color-mix(in srgb, var(--fxt-ink) 10%, transparent);
}

/* ===================
   3. 버튼 3단계 (specs 2-10) — 화면 CSS가 점진적으로 이 클래스로 옮겨간다.
   =================== */
.fxt-b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--fxt-sp-2);
	height: var(--fxt-h-md);
	padding: 0 var(--fxt-sp-4);
	border-radius: var(--fxt-r-sm);
	border: 1px solid transparent;
	font-family: var(--fxt-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.fxt-b:disabled,
.fxt-b[aria-disabled="true"] {
	opacity: 0.4;
	cursor: not-allowed;
}

.fxt-b--sm {
	height: var(--fxt-h-sm);
	padding: 0 var(--fxt-sp-3);
	font-size: 13px;
}

.fxt-b--lg {
	height: var(--fxt-h-lg);
	padding: 0 var(--fxt-sp-5);
}

/* 주요 — 화면당 하나. */
.fxt-b--primary {
	background: var(--fxt-brand);
	color: var(--fxt-on-brand);
}

.fxt-b--primary:hover:not(:disabled) {
	filter: brightness(0.94);
}

/* 기본 — 테두리만. */
.fxt-b--default {
	background: transparent;
	border-color: var(--fxt-line-strong);
	color: var(--fxt-ink);
}

.fxt-b--default:hover:not(:disabled) {
	background: var(--fxt-tint-weak);
}

/* 약함 — 글자만. */
.fxt-b--ghost {
	background: transparent;
	color: var(--fxt-ink-2);
}

.fxt-b--ghost:hover:not(:disabled) {
	background: var(--fxt-tint-weak);
	color: var(--fxt-ink);
}

/* 위험 — 파괴적 동작에만, 채움이 아니라 글자색으로만 구분(specs 2-9). */
.fxt-b--danger {
	color: var(--fxt-danger);
}

/* ===================
   4. 화면 폭 래퍼 (specs 2-3) — 본문(.fxt-content)은 이제 화면 끝까지 흐르고(team-shell.css),
   화면마다 이 래퍼로 가운데 정렬한다. 기본 1280, 읽기 화면은 수정자로 좁힌다.
   =================== */
.fxt-wrap {
	max-width: 1280px;
	margin: 0 auto;
	width: 100%;
}

.fxt-wrap--read {
	max-width: 928px;
}

.fxt-wrap--list {
	max-width: 960px;
}

/* ===================
   5. 표 숫자 정렬(specs 2-8·2-10) — 유틸리티.
   =================== */
.fxt-num {
	font-variant-numeric: tabular-nums;
}
