/* ==========================================================================
   corin2 /tools 공유 디자인 시스템 — "트레이딩 터미널의 연장"
   ==========================================================================
   근거: /trade(futures.css)의 --cpf-* 토큰 승계. 새 색 발명 금지.
   규율: 그림자·글로우·그라데이션 금지. 위계는 배경차 + 1px 헤어라인.
         민트(#00E4C4)는 인터랙션 신호 전용. 초록/빨강은 방향·손익 전용.
   브리프: toolsbuild/refs/design-brief.md
   최종 업데이트: 2026-07-20
   ========================================================================== */

/* ---------- 1. 토큰 ---------- */
:root {
  /* 표면 (cpf 승계) */
  --t-bg: #0B0E11;        /* 캔버스 = cpf-bg */
  --t-panel: #181A20;     /* 패널 = cpf-soft */
  --t-panel-2: #1F2023;   /* 입력·행 hover = bg-s1 */
  --t-line: #2B3139;      /* 헤어라인 = cpf-line */
  --t-line-2: #363A45;    /* 강조 헤어라인 = cpf-line2 */

  /* 잉크 */
  --t-ink: #EAECEF;       /* 본문 = cpf-ink */
  --t-sub: #B7BDC6;       /* 보조 = cpf-sub */
  --t-faint: #848E9C;     /* 메타 전용 = cpf-faint */

  /* 브랜드/인터랙션 */
  --t-mint: #00E4C4;      /* = cpf-brand */
  --t-mint-h: #00C9AD;    /* hover = cpf-brand-hover */
  --t-mint-soft: rgba(0, 228, 196, .10);
  --t-focus: rgba(0, 228, 196, .22);

  /* 의미색 — 방향·손익·경고에만 */
  --t-long: #20C898;      /* 롱·이익·상승 = cpf-long */
  --t-long-soft: rgba(32, 200, 152, .12);
  --t-short: #F04838;     /* 숏·손실·청산 = cpf-short */
  --t-short-soft: rgba(240, 72, 56, .12);
  --t-warn: #F5A623;      /* 경고 = cpf-warning */
  --t-warn-soft: rgba(245, 166, 35, .12);

  /* 타이포 */
  --t-font: "Pretendard Variable", Pretendard, "Noto Sans KR",
            "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --t-font-mono: ui-monospace, "Cascadia Mono", Consolas,
                 "Nanum Gothic Coding", monospace;

  /* 치수 */
  --t-radius: 6px;
  --t-wide: 960px;        /* 도구 영역 */
  --t-prose: 720px;       /* 산문 영역 */
  --t-row-h: 36px;        /* 표 행높이 (/trade 밀도) */
  --t-speed: 80ms;        /* hover/focus 트랜지션 */
}

/* ---------- 2. 베이스 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--t-bg);
  color: var(--t-ink);
  font-family: var(--t-font);
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 .5em;
}
h1 { font-size: 28px; }
h2 { font-size: 22px; margin-top: 2em; }
h3 { font-size: 18px; margin-top: 1.6em; }
p  { margin: 0 0 1em; }

a {
  color: var(--t-mint);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--t-mint-h); text-decoration: underline; }

small { font-size: 12px; color: var(--t-faint); }
hr { border: 0; border-top: 1px solid var(--t-line); margin: 32px 0; }

code, .t-mono {
  font-family: var(--t-font-mono);
  font-size: .92em;
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: 4px;
  padding: 1px 5px;
}

/* 수치는 어디서나 등폭 숫자 */
.num, .t-num,
table td.num, table th.num,
input[type="number"] {
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}
.num, td.num, th.num { text-align: right; }

/* 방향·손익 텍스트 (색만으로 의미 전달 금지 — 라벨 병기할 것) */
.t-up   { color: var(--t-long); }
.t-down { color: var(--t-short); }
.t-warn-text { color: var(--t-warn); }

/* 접근성 유틸 */
.t-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.t-skip {
  position: absolute; left: 8px; top: -48px;
  z-index: 100; padding: 8px 14px;
  background: var(--t-panel); color: var(--t-ink);
  border: 1px solid var(--t-mint); border-radius: var(--t-radius);
  transition: top var(--t-speed);
}
.t-skip:focus { top: 8px; }

/* 포커스 — 모든 인터랙티브 요소 공통 */
:focus-visible {
  outline: 2px solid var(--t-mint);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- 3. 셸: 헤더 ---------- */
.t-header {
  border-bottom: 1px solid var(--t-line);
  background: var(--t-bg);
}
.t-header-in {
  max-width: var(--t-wide);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
}
.t-logo {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 18px; font-weight: 700; color: var(--t-ink);
  white-space: nowrap;
}
.t-logo:hover { text-decoration: none; color: var(--t-ink); }
.t-logo .t-logo-tools {
  font-size: 12px; font-weight: 500; color: var(--t-mint);
  border: 1px solid var(--t-line-2); border-radius: 4px;
  padding: 1px 6px; line-height: 1.5;
}
.t-nav {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.t-nav::-webkit-scrollbar { display: none; }
.t-nav a {
  color: var(--t-sub);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--t-speed), background var(--t-speed);
}
.t-nav a:hover { color: var(--t-ink); background: var(--t-panel); text-decoration: none; }
.t-nav a[aria-current="page"] {
  color: var(--t-mint);
  background: var(--t-mint-soft);
}

/* ---------- 4. 셸: 메인 컨테이너 ---------- */
.t-main {
  max-width: var(--t-wide);
  margin: 0 auto;
  padding: 28px 16px 56px;
}
.t-prose { max-width: var(--t-prose); }
.t-lead { color: var(--t-sub); font-size: 15px; margin-bottom: 24px; }

/* 섹션 라벨 — 터미널 패널 헤더 문법 (영문 대문자 eyebrow 대체) */
.t-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--t-sub);
  margin: 0 0 10px;
}
.t-label::before {
  content: "";
  width: 2px; height: 12px;
  background: var(--t-mint);
  flex: none;
}
/* 산문 흐름 속 라벨 리듬 — 위 블록과 44px, 라벨 뒤 제목은 밀착 (페이지별 보정 금지, 공통 규칙) */
.t-prose .t-label { margin-top: 44px; }
.t-label + h2 { margin-top: 0; }

/* ---------- 5. 셸: 푸터 ---------- */
.t-footer {
  border-top: 1px solid var(--t-line);
  margin-top: 24px;
}
.t-footer-in {
  max-width: var(--t-wide);
  margin: 0 auto;
  padding: 20px 16px 32px;
  font-size: 13px;
  color: var(--t-faint);
}
.t-footer-links {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 0; margin: 0 0 12px; list-style: none;
}
.t-footer-links a { color: var(--t-sub); }
.t-footer-links a:hover { color: var(--t-mint); }
.t-disclaimer { margin: 0 0 6px; }
.t-updated { margin: 0; }

/* ---------- 6. TL;DR 박스 (GEO — 페이지 상단 3줄 요약) ---------- */
.t-tldr {
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-left: 2px solid var(--t-mint);
  border-radius: var(--t-radius);
  padding: 14px 18px;
  margin: 0 0 28px;
}
.t-tldr-title {
  font-size: 12px; font-weight: 700; color: var(--t-mint);
  margin: 0 0 6px;
}
.t-tldr ul { margin: 0; padding-left: 18px; }
.t-tldr li { margin: 2px 0; font-size: 14px; line-height: 1.65; }
.t-tldr li::marker { color: var(--t-faint); }

/* ---------- 7. 패널·카드 ---------- */
.t-panel {
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
}
.t-panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--t-line);
  font-size: 13px; font-weight: 700;
}
.t-panel-h .t-panel-meta { font-size: 12px; font-weight: 400; color: var(--t-faint); }
.t-panel-b { padding: 16px; }

/* 도구 2컬럼: 입력(좌) : 결과(우 sticky) */
.t-tool {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
  align-items: start;
  margin: 0 0 36px;
}
.t-tool .t-result-panel { position: sticky; top: 16px; }

/* ---------- 8. 입력폼 ---------- */
.t-field { margin: 0 0 14px; }
.t-field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--t-sub);
  margin-bottom: 6px;
}
.t-field-label .t-field-hint { font-size: 12px; font-weight: 400; color: var(--t-faint); }

.t-input, .t-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--t-panel-2);
  color: var(--t-ink);
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--t-speed), background var(--t-speed);
}
.t-input:hover, .t-select:hover { border-color: var(--t-line-2); }
.t-input:focus, .t-select:focus {
  outline: none;
  border-color: var(--t-mint);
  box-shadow: 0 0 0 3px var(--t-focus); /* 포커스 링 — 글로우 아님 */
}
.t-input::placeholder { color: var(--t-faint); }
.t-input[type="number"] { text-align: right; }
.t-input[type="number"]::-webkit-outer-spin-button,
.t-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.t-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.t-input[aria-invalid="true"] { border-color: var(--t-short); }
.t-field-error { font-size: 12px; color: var(--t-short); margin: 5px 0 0; }

/* 단위 접미 인풋 (예: [ 64500 ][USDT]) */
.t-input-unit { position: relative; }
.t-input-unit .t-input { padding-right: 56px; }
.t-input-unit .t-unit {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px; color: var(--t-faint);
  pointer-events: none;
}

.t-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--t-faint) 50%),
    linear-gradient(135deg, var(--t-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
  cursor: pointer;
}

/* 나란히 배치 */
.t-field-row { display: flex; gap: 10px; }
.t-field-row > * { flex: 1; min-width: 0; }

/* 세그먼트 토글 (롱/숏, 격리/교차) — radio 기반 */
.t-seg {
  display: flex;
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
  overflow: hidden;
  background: var(--t-panel-2);
}
.t-seg input[type="radio"] {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; clip-path: inset(50%); overflow: hidden;
}
.t-seg label {
  flex: 1;
  text-align: center;
  font-size: 14px; font-weight: 500;
  color: var(--t-sub);
  padding: 9px 8px;
  cursor: pointer;
  border-left: 1px solid var(--t-line);
  transition: background var(--t-speed), color var(--t-speed);
}
.t-seg label:first-of-type { border-left: 0; }
.t-seg input:checked + label { background: var(--t-mint-soft); color: var(--t-mint); }
.t-seg input:focus-visible + label { outline: 2px solid var(--t-mint); outline-offset: -2px; }
/* 롱/숏 전용 변형 */
.t-seg--side input.is-long:checked + label  { background: var(--t-long-soft);  color: var(--t-long); }
.t-seg--side input.is-short:checked + label { background: var(--t-short-soft); color: var(--t-short); }

/* 스위치 토글 */
.t-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--t-sub); }
.t-switch input {
  appearance: none;
  width: 34px; height: 20px; margin: 0;
  background: var(--t-panel-2);
  border: 1px solid var(--t-line-2);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background var(--t-speed), border-color var(--t-speed);
}
.t-switch input::after {
  content: "";
  position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--t-faint);
  transition: transform 120ms, background var(--t-speed);
}
.t-switch input:checked { background: var(--t-mint-soft); border-color: var(--t-mint); }
.t-switch input:checked::after { transform: translateX(14px); background: var(--t-mint); }

/* 슬라이더 (레버리지) */
.t-range { display: block; width: 100%; }
.t-range input[type="range"] {
  width: 100%; height: 28px; margin: 0;
  appearance: none; -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.t-range input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: var(--t-line-2);
}
.t-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; margin-top: -6.5px;
  border-radius: 50%;
  background: var(--t-mint);
  border: 3px solid var(--t-bg);
}
.t-range input[type="range"]::-moz-range-track {
  height: 3px; border-radius: 2px;
  background: var(--t-line-2);
}
.t-range input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--t-mint);
  border: 3px solid var(--t-bg);
}
.t-range-scale {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--t-faint);
  margin-top: 2px;
}

/* ---------- 9. 버튼 ---------- */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border: 1px solid var(--t-line-2);
  border-radius: var(--t-radius);
  background: var(--t-panel-2);
  color: var(--t-ink);
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background var(--t-speed), border-color var(--t-speed), color var(--t-speed);
  text-decoration: none;
}
.t-btn:hover { border-color: var(--t-faint); text-decoration: none; color: var(--t-ink); }
.t-btn:disabled { opacity: .45; cursor: not-allowed; }

.t-btn--primary {
  background: var(--t-mint);
  border-color: var(--t-mint);
  color: #071512; /* 민트 위 잉크 — /trade 로그인 버튼 문법 */
  font-weight: 700;
}
.t-btn--primary:hover { background: var(--t-mint-h); border-color: var(--t-mint-h); color: #071512; }

.t-btn--long  { background: var(--t-long);  border-color: var(--t-long);  color: #05130d; font-weight: 700; }
.t-btn--long:hover  { filter: brightness(1.08); color: #05130d; }
.t-btn--short { background: var(--t-short); border-color: var(--t-short); color: #fff; font-weight: 700; }
.t-btn--short:hover { filter: brightness(1.08); color: #fff; }

.t-btn--ghost { background: transparent; }
.t-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.t-btn--block { width: 100%; }

/* ---------- 10. 결과 블록 ---------- */
.t-result-num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
  margin: 2px 0 0;
}
.t-result-num .t-unit-lg { font-size: 16px; font-weight: 500; color: var(--t-faint); margin-left: 4px; }
.t-result-caption { font-size: 12px; color: var(--t-faint); margin: 0; }

/* 키-값 행 (결과 상세) */
.t-kv { margin: 12px 0 0; }
.t-kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  min-height: 32px;
  padding: 5px 0;
  border-top: 1px solid var(--t-line);
  font-size: 14px;
}
.t-kv-row:first-child { border-top: 0; }
.t-kv-row dt { color: var(--t-sub); margin: 0; flex: none; }
.t-kv-row dd {
  margin: 0; text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}
.t-kv-row.is-total { border-top: 1px solid var(--t-line-2); font-weight: 700; }

/* 결과 갱신 플래시 — 호가창 관용구. 유일하게 허용된 모션 */
@keyframes t-flash { from { background: var(--t-mint-soft); } to { background: transparent; } }
.t-flash { animation: t-flash 360ms ease-out; }
@keyframes t-flash-long  { from { background: var(--t-long-soft); }  to { background: transparent; } }
@keyframes t-flash-short { from { background: var(--t-short-soft); } to { background: transparent; } }
.t-flash--long  { animation: t-flash-long 360ms ease-out; }
.t-flash--short { animation: t-flash-short 360ms ease-out; }

/* 빈 상태 — 방향을 주는 문장으로 채울 것 */
.t-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--t-faint);
}

/* ---------- 11. 표 ---------- */
.t-table-wrap { overflow-x: auto; border: 1px solid var(--t-line); border-radius: var(--t-radius); }
.t-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--t-panel);
}
.t-table th, .t-table td {
  height: var(--t-row-h);
  padding: 0 14px;
  border-top: 1px solid var(--t-line);
  text-align: left;
  white-space: nowrap;
}
.t-table thead th {
  border-top: 0;
  font-size: 12px; font-weight: 500; color: var(--t-faint);
  background: var(--t-bg);
}
.t-table tbody tr:hover { background: var(--t-panel-2); }
.t-table td.num, .t-table th.num { text-align: right; }
.t-table .is-total td { border-top: 1px solid var(--t-line-2); font-weight: 700; }
/* 산문형 비교표(예: 공정성 콜아웃·판정기준·tier)는 셀을 줄바꿈 허용 — nowrap이면 데스크톱에서도
   테두리 안 가로스크롤이 생겨 '예'열이 가려진다. 숫자정렬 표(계산기)는 기본 nowrap 유지.
   body에 word-break:keep-all이 있어 CJK는 단어 단위로 자연 줄바꿈된다. */
.t-table--prose th, .t-table--prose td { white-space: normal; }

/* ---------- 12. 시그니처: 도구 시세판 (허브) ---------- */
.t-board {
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
  background: var(--t-panel);
  overflow: hidden;
}
.t-board-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--t-line);
  color: inherit;
  transition: background var(--t-speed);
}
.t-board-row:first-child { border-top: 0; }
.t-board-row:hover { background: var(--t-panel-2); text-decoration: none; color: inherit; }
.t-board-name { min-width: 0; }
.t-board-name b { display: block; font-size: 15px; }
.t-board-name span { display: block; font-size: 13px; color: var(--t-faint); margin-top: 1px; }
.t-board-quote {
  margin-left: auto; flex: none;
  font-size: 14px;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
  color: var(--t-sub);
  text-align: right;
}
.t-board-row .t-board-go {
  flex: none; color: var(--t-faint);
  font-size: 13px;
  transition: color var(--t-speed), transform var(--t-speed);
}
.t-board-row:hover .t-board-go { color: var(--t-mint); transform: translateX(2px); }

/* ---------- 13. 시그니처: 가격 레일 게이지 (청산가) ---------- */
.t-rail { margin: 18px 0 6px; }
.t-rail-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--t-line);
}
.t-rail-fill {
  /* 진입→청산 구간. inline style로 left/width % 지정 */
  position: absolute; top: 0; bottom: 0;
  border-radius: 3px;
  background: var(--t-short-soft);
  border: 1px solid var(--t-short);
}
.t-rail-marker {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 2px; height: 16px;
}
.t-rail-marker.is-entry { background: var(--t-mint); }
.t-rail-marker.is-liq   { background: var(--t-short); }
.t-rail-marker.is-now   { background: var(--t-ink); }
.t-rail-labels {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 12px; color: var(--t-faint);
  font-variant-numeric: tabular-nums lining-nums;
}
.t-rail-labels b { color: var(--t-ink); font-weight: 500; display: block; }
.t-rail-labels span:last-child { text-align: right; }
.t-rail-dist {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}

/* ---------- 14. 시그니처: 차감 워터폴 바 (수수료·손익) ---------- */
.t-bar { margin: 16px 0 6px; }
.t-bar-track {
  display: flex;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--t-line);
}
.t-bar-seg { min-width: 2px; }               /* inline style로 width % 지정 */
.t-bar-seg.is-net   { background: var(--t-long); }
.t-bar-seg.is-fee   { background: var(--t-warn); }
.t-bar-seg.is-fund  { background: var(--t-faint); }
.t-bar-seg.is-loss  { background: var(--t-short); }
.t-bar-legend {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  margin-top: 8px;
  font-size: 12px; color: var(--t-sub);
}
.t-bar-legend .t-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 2px; margin-right: 5px;
  vertical-align: 0;
}
.t-dot.is-net  { background: var(--t-long); }
.t-dot.is-fee  { background: var(--t-warn); }
.t-dot.is-fund { background: var(--t-faint); }
.t-dot.is-loss { background: var(--t-short); }

/* ---------- 15. 시그니처: 정산서 스코어카드 (습관 리포트) ---------- */
.t-score { border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; }
.t-score-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--t-line);
  background: var(--t-panel);
}
.t-score-row:first-child { border-top: 0; }
.t-score-name { min-width: 0; }
.t-score-name b { display: block; font-size: 14px; }
.t-score-name span { display: block; font-size: 12px; color: var(--t-faint); }
.t-score-val {
  margin-left: auto;
  font-size: 13px; color: var(--t-sub);
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
}
.t-stamp {
  flex: none;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  font-size: 15px; font-weight: 700;
  font-variant-numeric: lining-nums;
}
.t-stamp.is-a { color: var(--t-long); background: var(--t-long-soft); }
.t-stamp.is-b { color: var(--t-mint); background: var(--t-mint-soft); }
.t-stamp.is-c { color: var(--t-warn); background: var(--t-warn-soft); }
.t-stamp.is-d, .t-stamp.is-f { color: var(--t-short); background: var(--t-short-soft); }

/* ---------- 16. FAQ 아코디언 (네이티브 details — JS 불필요) ---------- */
.t-faq { border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; }
.t-faq details { border-top: 1px solid var(--t-line); background: var(--t-panel); }
.t-faq details:first-child { border-top: 0; }
.t-faq summary {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background var(--t-speed);
}
.t-faq summary::-webkit-details-marker { display: none; }
.t-faq summary:hover { background: var(--t-panel-2); }
.t-faq summary::after {
  content: "+";
  margin-left: auto; flex: none;
  color: var(--t-faint);
  font-size: 17px; font-weight: 400;
  line-height: 1;
  transition: transform 120ms;
}
.t-faq details[open] summary::after { transform: rotate(45deg); color: var(--t-mint); }
.t-faq .t-faq-a {
  padding: 0 16px 15px;
  font-size: 14px;
  color: var(--t-sub);
}
.t-faq .t-faq-a p { margin: 0 0 .7em; }
.t-faq .t-faq-a p:last-child { margin-bottom: 0; }

/* ---------- 17. 배지 (의미 있는 것만) ---------- */
.t-badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border-radius: 4px;
  font-size: 12px; font-weight: 700;
  line-height: 1;
}
.t-badge--long  { color: var(--t-long);  background: var(--t-long-soft); }
.t-badge--short { color: var(--t-short); background: var(--t-short-soft); }
.t-badge--warn  { color: var(--t-warn);  background: var(--t-warn-soft); }
.t-badge--muted { color: var(--t-sub);   background: var(--t-panel-2); border: 1px solid var(--t-line); }

/* ---------- 18. 출처·주석 (GEO — 수치 주장엔 출처) ---------- */
.t-src {
  font-size: 12px;
  color: var(--t-faint);
  margin: 6px 0 0;
}
.t-src a { color: var(--t-faint); text-decoration: underline; text-underline-offset: 2px; }
.t-src a:hover { color: var(--t-sub); }

.t-note {
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-left: 2px solid var(--t-warn);
  border-radius: var(--t-radius);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--t-sub);
  margin: 16px 0;
}

/* ---------- 19. 반응형 ---------- */
@media (max-width: 860px) {
  .t-tool { grid-template-columns: 1fr; }
  .t-tool .t-result-panel { position: static; }
  h1 { font-size: 24px; }
  .t-result-num { font-size: 34px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .t-main { padding: 20px 12px 44px; }
  .t-header-in, .t-footer-in { padding-left: 12px; padding-right: 12px; }
  .t-panel-b { padding: 14px 12px; }
  .t-field-row { flex-direction: column; gap: 0; }
  .t-board-row { padding: 12px 14px; }
  .t-board-quote { font-size: 13px; }
  .t-table th, .t-table td { padding: 0 10px; }
  h1 { font-size: 22px; }
  .t-result-num { font-size: 30px; }
  /* iOS Safari는 <16px 입력에 포커스 시 페이지를 자동 확대(줌)한다. maximum-scale 잠금은 a11y
     저해라 폰트 크기로 방지한다(입력만 16px, 나머지 14px 유지). */
  .t-input, .t-select { font-size: 16px; }
  /* 모바일 nav는 4링크가 넘쳐 가로스크롤되는데 스크롤바가 숨겨져 신호가 없다.
     오른쪽 끝을 페이드해 '더 있음'을 시각적으로 힌트한다(스크롤 가능은 유지). */
  .t-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
           mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
}

/* ---------- 20. 모션 존중 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
