/* =========================================================
   반응형 규칙 (F1~F5 공통, 페이지 스타일과 roles.css 뒤에 불러온다)
   기준 화면: 1440 데스크톱 / 1024 태블릿 가로 / 768 태블릿 세로 / 390 모바일 (360까지 깨지지 않게)
   1440 초과(1920 포함): 글자와 칸은 1440 그대로, 콘텐츠 폭은 1360에서 멈추고 바깥 여백만 늘어난다
   구간  | 여백 | 섹션 위아래 | 칸 사이 | 큰 제목 / 제목1 / 제목2 / 제목3 / 리드 / 본문
   1440+ | 40~  | 페이지 값   | 페이지  | 페이지 값 그대로
   1024  | 32   | 96          | 16      | 48 / 36 / 28 / 22 / 19 / 16
   768   | 32   | 96          | 16      | 같음, 4열 → 2열, 2단 머리 → 위아래
   390   | 20   | 72          | 12      | 34 / 28 / 24 / 20 / 17 / 15, 목록 1열, 누르는 곳 44 이상
   ========================================================= */

/* 1440 초과: 콘텐츠 폭 1360에서 멈춤 */
@media (min-width:1441px){
  :root{--pad:max(40px,calc((100vw - 1360px) / 2))}
}

/* 그리드와 플렉스 칸이 내용(긴 단어, 로고 그림) 때문에 화면 밖으로 밀리지 않게 */
@media (max-width:1439px){
  section *,footer *,header *{min-width:0}
}

/* ---------- 1024 이하: 태블릿 가로 ---------- */
@media (max-width:1023px){
  :root{--pad:32px;--sec:96px;--gut:16px;
    --fs-hero:48px;--fs-d1:48px;--fs-big:48px;--fs-mega:48px;--fs-case:48px;--fs-h1:36px;--fs-h2:28px;--fs-list:28px;--fs-h3:22px;--fs-h3b:24px;--fs-lead:19px;
    --fs-giant:88px;--fs-num:96px}
  /* 4열 지표, 카드 → 2열 */
  .kp4,.eff,.stats,.tcards,.tr{grid-template-columns:repeat(2,1fr)!important;row-gap:var(--gut)!important}
  .plogos{grid-template-columns:repeat(3,1fr)!important}
  /* F2: 에이전트 머리와 목록을 위아래로 */
  .lead-l,.lead-r{grid-column:1/-1!important}
  .lead-l .in{position:static!important}
  .lead-r{margin-top:var(--s-7)}
  /* F4: 지표 칸 높이 */
  .eff>div{min-height:220px}
}

/* ---------- 767 이하: 모바일 (390 기준) ---------- */
@media (max-width:767px){
  :root{--pad:20px;--sec:72px;--gut:12px;--pad-frame:8px;--r-sheet:28px;
    --fs-hero:34px;--fs-d1:34px;--fs-big:34px;--fs-mega:34px;--fs-case:34px;--fs-h1:28px;--fs-h2:24px;--fs-list:24px;--fs-h3:20px;--fs-h3b:22px;--fs-lead:17px;--fs-body:15px;
    --fs-giant:52px;--fs-num:64px}
  /* 2단 머리(제목 왼쪽, 내용 오른쪽) → 위아래 */
  .two,.svc,.faint,.feat,.dark,.ag,.cases,.cards,.state .row{grid-template-columns:1fr!important}
  .two-h,.two-c,.faint .plogos{grid-column:1/-1!important}
  .two-h .in{position:static!important}
  .two-c,.svc .list,.faint ul{margin-top:var(--s-6)}
  /* 표 행: 이름 한 줄, 나머지는 아래로 */
  .rows li,.crows li,.svc .list li{grid-template-columns:1fr!important;row-gap:var(--s-1)}
  .rows .c,.svc .list .k,.crows .p{text-align:left!important}
  .plogos{grid-template-columns:repeat(2,1fr)!important;row-gap:var(--s-6)!important}
  /* 지표는 2열 유지 (숫자가 크므로 칸 안에서 줄임) */
  .kp4 b,.stats .st b,.eff b{font-size:40px!important}
  /* 누르는 곳 44 이상 */
  a.btn,a.pill,a.solid,a.b2,a.soft,.hd .btn,.cta a,.band a,.card a,#mail{min-height:44px;display:inline-flex!important;align-items:center}
  /* 가로 트랙: 고정하지 않고 손가락으로 넘김 */
  .htrack-pin{position:static;height:auto;padding-top:var(--sec);padding-bottom:var(--sec)}
  .htrack-row{overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;transform:none!important;width:auto!important;scrollbar-width:none}
  .htrack-row::-webkit-scrollbar{display:none}
  .htrack-row>*{scroll-snap-align:start}
  .hcard{width:78vw!important}
}
/* F3: 떠 있는 메뉴가 스크롤 때 좁아지는 효과는 모바일에서 끔 (좁아지면 버튼이 눌림) */
@media (max-width:767px){
  .nav.small{margin-left:var(--pad)!important;margin-right:var(--pad)!important}
  .nav .r a{white-space:nowrap}
}
