/* ═══════════════════════════════════════════════════
   ECHO&DELTA AX Cases 아틀라스 — cases.html 전용 (2026-10-19, cases.css 교체)
   전 셀렉터 .atlas 스코프. tokens.css 뒤에 로드한다. 색·선·간격은 전부 토큰 — 이 파일에 hex·rgba 없음.
   수치 정본: work/finance-atlas-cases-20261019/design/개발-인계-명세.md §5–§9.
   구간: ≥1120 문서 셸 사이드바 240 + 격자 한 판 · 901–1119 머리 줄 + 가로 사이드바 · ≤900 머리 막대 + 숫자 지도 + 바텀시트(M1)
   2026-10-19 두 문서 공간 개편(명세 v2 §7): 사이트 GNB → 문서 셸(assets/docs-shell.css). 골격·머리·산업 선택·경로 막대는 그쪽,
   이 파일은 업권·보기·격자·팝업·시트와 구간별 셸 배치만. --atlas-gnb(GNB 실측 72)는 GNB가 없어져 지웠다
   ═══════════════════════════════════════════════════ */
.atlas { --atlas-rowhead: 176px; --atlas-head: 40px; }
.atlas > main { min-width: 0; }

/* ── 골격 — 격자 위에는 경로 막대 한 줄뿐(§6.5). 푸터는 격자 아래 스크롤 ── */

.atlas__label { font-family: var(--f-mono); font-size: .75rem; line-height: 1.5;
                                 letter-spacing: .14em; color: var(--ink-faint); }
.atlas__n { font-family: var(--f-mono); font-size: .75rem; font-weight: 400; color: var(--ink-faint);
            font-variant-numeric: tabular-nums; }
.atlas__loading { padding: var(--space-4) 24px; color: var(--ink-muted); font-size: .9rem; list-style: none; }
.atlas__inds .atlas__loading { padding: 10px 0; font-size: .82rem; }
.atlas__retry { margin-top: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-4);
                border: var(--rule-row) solid var(--rule-strong); background: var(--surface); cursor: pointer; }

/* ── 사이드바 (§5.3) — sticky·독립 스크롤은 .doc-side, 산업 선택은 .doc-pick(docs-shell.css). 업권·단계·대상은 그대로 ── */
.atlas__label { margin-top: 12px; }
.atlas__inds { list-style: none; margin: 4px 0 0; padding: 0; }
.atlas__ind { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: calc(100% + 12px);
              min-height: 44px; margin-left: -12px;   /* 왼쪽 선 2 + 패딩 10 — 업권 이름이 라벨 축에 앉는다 */
              padding: 7px 12px 7px 10px; border: 0; border-left: 2px solid transparent; background: none;
              cursor: pointer; text-align: left; font-size: .9rem; font-weight: 500; color: var(--ink-faint);
              transition: color var(--t-hover) ease; }
.atlas__ind[aria-current] { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
.atlas__ind .atlas__n b { font-weight: 600; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .atlas__ind:not([aria-current]):hover { color: var(--ink); } }

/* 보기 — 단계·대상 두 군, '전체' 포함 단일 선택(네이티브 라디오). 2026-10-19 다중 토글·회사·초기화 대체.
   모양은 업권 목록과 같은 세로 선택 목록: 고른 것 = 왼쪽 2px 잉크 선 + 잉크 600, 나머지 = faint. 건수는 오른쪽 모노 */
.atlas__view-btn { display: none; }
.atlas__group { min-width: 0; margin: 16px 0 0; padding: 12px 0 0; border: 0; border-top: var(--rule-row) solid var(--rule-soft); }
.atlas__group > legend.atlas__label { float: left; width: 100%; margin: 0 0 4px; padding: 0; }   /* float: legend가 위 괘선에 걸리지 않게 */
.atlas__opts { clear: both; }
.atlas__opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
              width: calc(100% + 12px); min-height: 36px; margin-left: -12px;   /* 업권 목록과 같은 축: 선 2 + 패딩 10 */
              padding: 6px 12px 6px 10px; border-left: 2px solid transparent; cursor: pointer;
              font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-faint);
              transition: color var(--t-hover) ease; }
.atlas__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.atlas__opt:has(input:checked) { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
.atlas__opt:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.atlas__opt .atlas__n { font-size: 12px; font-weight: 400; }
@media (hover: hover) and (pointer: fine) { .atlas__opt:not(:has(input:checked)):hover { color: var(--ink); } }

/* ── 격자 (§5.4) — 열·행 머리는 이름만. 행은 1fr로 나눠 한 판에 든다 ── */
.atlas__grid-wrap { min-width: 0; padding: 0 var(--frame-gutter) 0 24px;   /* 왼쪽 24 = 경로 막대 글자축(§6.5) */
                    height: calc(100dvh - var(--doc-top) - var(--rule-row));
                    min-height: calc(var(--atlas-head) + var(--rows, 5) * 44px); }   /* CLS 0 — 데이터 전에 자리를 잡는다 */
.atlas__grid { height: 100%; }
.atlas__grid[role="grid"] { display: grid; grid-template-columns: var(--atlas-rowhead) repeat(5, minmax(0, 1fr));
                            grid-template-rows: var(--atlas-head) repeat(var(--rows), minmax(44px, 1fr)); }
.atlas__r { display: contents; }
.atlas__ch { display: flex; align-items: center; min-width: 0; padding: 0 12px; border-bottom: var(--rule-row) solid var(--rule-strong);
             font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ink-muted); }
.atlas__ch--corner { padding: 0; }
.atlas__rh { min-width: 0; padding: 10px 12px; background: var(--surface-muted); border-bottom: var(--rule-row) solid var(--rule-soft);
             font-size: 13px; font-weight: 600; line-height: 19px; color: var(--ink); }
.atlas__gc { min-width: 0; min-height: 0; border-right: var(--rule-row) solid var(--rule-soft);
             border-bottom: var(--rule-row) solid var(--rule-soft); }
.atlas__r > .atlas__gc:last-child { border-right: 0; }

/* 셀 (§5.5) — 회사(600) + 컴팩트명(400) 줄 13/19. 넘치면 +N(모노 12/16). 단계는 글자 농도로만 */
.atlas__cell { display: flex; flex-direction: column; align-items: stretch; width: 100%; height: 100%; min-height: 0;
               padding: 10px 12px; border: 0; background: none; text-align: left; overflow: hidden; cursor: pointer; }
.atlas__cell:focus-visible { outline-offset: -2px; }
.atlas__cell[aria-disabled="true"] { cursor: default; }
.atlas__line { display: block; font-size: 13px; line-height: 19px; color: var(--ink); white-space: nowrap;
               overflow: hidden; text-overflow: ellipsis; }
.atlas__line b { font-weight: 600; }
.atlas__more, .atlas__empty--masked { font-family: var(--f-mono); font-size: 12px; line-height: 16px; color: var(--ink-faint); }
.atlas__empty { font-size: 13px; line-height: 19px; color: var(--ink-faint); }
@media (hover: hover) and (pointer: fine) {
  .atlas__cell:not([aria-disabled="true"]):hover { outline: var(--rule-row) solid var(--ink); outline-offset: -1px; }
}
.atlas__cell.is-open { background: var(--signal-soft); outline: var(--rule-row) solid var(--signal); outline-offset: -1px; }

/* ── 팝업 (§5.6) — 사이트 첫 모달. 네이티브 <dialog>, 640 한 열, 항목당 세 줄 ── */
dialog.atlas__pop { width: min(640px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 96px);
                    margin: auto; padding: 0; border: 0; border-top: var(--rule-doc) solid var(--ink);
                    background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px var(--shadow-soft); }
dialog.atlas__pop[open] { display: flex; flex-direction: column; }
dialog.atlas__pop::backdrop { background: var(--scrim); }
:root:has(dialog.atlas__pop[open]) { overflow: hidden; }   /* 뒤 문서 스크롤 잠금 — 스크롤은 dialog 안만 */
.atlas__pop-head { display: flex; align-items: baseline; gap: 10px; flex: none; padding: 18px 24px 10px;
                   border-bottom: var(--rule-row) solid var(--rule-soft); }
.atlas__pop-t { font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.atlas__pop-n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.atlas__pop-x { margin: -12px 0 -12px auto; min-height: 44px; padding: 0 0 0 12px; border: 0; background: none; cursor: pointer;
                font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.atlas__esc { color: var(--ink-faint); }
.atlas__pop-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 14px; }
.atlas__items { list-style: none; margin: 0; padding: 0; }
.atlas__item { padding: 12px 0; border-bottom: var(--rule-row) solid var(--rule-soft); }
.atlas__item:last-child { border-bottom: 0; }
.atlas__item-head { display: flex; align-items: baseline; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.atlas__item-t { flex: 1; min-width: 0; }
.atlas__item-t b { font-weight: 600; }
.atlas__item-meta { font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.atlas__item-sum { max-width: 38em; margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--ink-muted); }
.atlas__item-src { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-muted); }
.atlas__item-src a { color: var(--ink-muted); text-underline-offset: 3px; }
.atlas__item-src .atlas__pub { font-family: var(--f-mono); color: var(--ink-faint); }
.atlas__colhead { margin: 0 -24px; padding: 6px 24px; background: var(--surface-muted);
                  font-family: var(--f-mono); font-size: 12px; color: var(--ink-muted); }
.atlas__tail { padding-top: 12px; border-top: var(--rule-row) solid var(--rule-soft);
               font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); }
.atlas__tail button { min-height: 44px; margin: -12px 0; padding: 0; border: 0; background: none; cursor: pointer;
                      font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .atlas__item-src a:hover, .atlas__tail button:hover { color: var(--ink); }
}

/* ── 901–1119 — 머리 줄(워드마크 · 공간 버튼) 아래 사이드바를 가로줄로(v1 §6, v2 §6.7): 산업 ▾ · 업권 밑줄 토글 · 보기 ▾ 팝오버. 경로 막대는 숨긴다 ── */
@media (min-width: 901px) and (max-width: 1119px) {
  .atlas { --atlas-rowhead: 150px; }
  .atlas .doc-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--doc-top) auto auto; }
  .atlas .doc-head { position: relative; grid-column: 1; grid-row: 1; padding: 0 var(--frame-gutter); border-right: 0; }
  .atlas .doc-main { grid-column: 1; grid-row: 3; }
  .atlas .doc-top { display: none; }
  .atlas__side { position: sticky; top: 0; grid-column: 1; grid-row: 2; z-index: 5; display: flex; align-items: center; gap: 20px;
                 height: calc(56px + var(--rule-doc)); overflow: visible; padding: 0 var(--frame-gutter);
                 background: var(--surface); border-right: 0; border-bottom: var(--rule-doc) solid var(--ink); }
  .atlas .doc-pick { flex: none; margin: 0; }
  .atlas .doc-pick__btn { width: auto; }
  .atlas .doc-pick__menu { width: 300px; }
  .atlas__nav { display: flex; flex: 1; align-items: center; gap: 20px; min-width: 0; padding: 0; }
  .atlas__nav > .atlas__label { display: none; }
  .atlas__inds { display: flex; gap: 14px; margin: 0; }
  .atlas__ind { width: auto; margin: 0; padding: 0; gap: 4px; border-left: 0; }
  .atlas__ind > span:first-child { padding: 2px 0; border-bottom: var(--rule-row) solid transparent; }
  .atlas__ind[aria-current] > span:first-child { border-bottom-color: var(--ink); }
  .atlas__view-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: auto; padding: 0;
                     border: 0; background: none; cursor: pointer; font-size: 13px; font-weight: 600; }
  .atlas__view { display: none; position: absolute; top: 100%; right: var(--frame-gutter); width: 300px; padding: 4px 20px 16px;
                 background: var(--surface); border-top: var(--rule-block) solid var(--ink); box-shadow: 0 10px 30px var(--shadow-soft); }
  .atlas__side.is-view-open .atlas__view { display: block; }
  .atlas__view > .atlas__group:first-child { border-top: 0; }
  .atlas__grid-wrap { padding-left: var(--frame-gutter);
                      height: calc(100dvh - var(--doc-top) - 56px - var(--rule-doc)); }   /* 첫 화면에 머리 줄 + 가로 사이드바 + 격자 한 판 */
}

/* ── ≤900 — 모바일 M1(§7): 숫자 지도 + 바텀시트. 641–900도 같은 문법 ── */
@media (max-width: 900px) {
  /* 선택 줄 = docs-shell.css .doc-mpicks 상자형 한 줄(jobs와 한 벌, 2026-10-19). 아래 3px 잉크 괘선이 숫자 지도와 나눈다 */
  .atlas__mhead { padding-bottom: 12px; border-bottom: var(--rule-doc) solid var(--ink); }
  .atlas__grid-wrap { height: auto; min-height: calc(var(--atlas-head) + var(--rows, 5) * 44px); padding: 0 var(--frame-gutter); border-left: 0; }
  .atlas { --atlas-head: 44px; }
  .atlas__grid[role="grid"] { grid-template-columns: 96px repeat(5, minmax(0, 1fr)); grid-template-rows: var(--atlas-head) repeat(var(--rows), 44px); }
  .atlas__ch { position: sticky; top: 0; z-index: 2; justify-content: center; padding: 0 2px; background: var(--surface);
               font-family: var(--f-mono); font-size: 12px; line-height: 1.25; text-align: center; white-space: pre-line; }
  .atlas__ch--corner { justify-content: flex-start; }
  .atlas__rh { padding: 0; background: none; }
  .atlas__rhb { display: flex; align-items: center; width: 100%; height: 100%; padding: 0 6px 0 0; border: 0; background: none;
                cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; line-height: 1.25; }
  .atlas__rhb > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }   /* 44px 행에 두 줄까지 */
  .atlas__gc { border-right: 0; }
  .atlas__cell { align-items: center; justify-content: center; padding: 0; }
  .atlas__num { font-family: var(--f-mono); font-size: 15px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
  .atlas__num.is-max { font-weight: 600; color: var(--ink); }
  .atlas__num.is-zero { color: var(--ink-faint); }
  /* 바텀시트 — 같은 <dialog>, 아래에서 올라온다. 셀 시트 = 내용 높이(최대 90dvh), 행·보기 시트 = 90dvh 고정(§12-7) */
  dialog.atlas__pop { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 90dvh; margin: 0;
                      box-shadow: none; transform: none; transition: transform 200ms var(--ease-out); }
  @starting-style { dialog.atlas__pop[open] { transform: translateY(100%); } }
  dialog.atlas__pop.is-tall { height: 90dvh; }
  .atlas__pop-head { padding: 14px var(--frame-gutter) 10px; }
  .atlas__esc { display: none; }
  .atlas__pop-body { padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
  .atlas__item { min-height: 44px; padding: 12px var(--frame-gutter); }
  .atlas__item-t { font-size: 15px; line-height: 1.45; }
  .atlas__item-t b { font-weight: 600; }
  .atlas__item-meta2 { margin-top: 2px; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; color: var(--ink-faint); }
  .atlas__item-meta2 a { color: var(--ink-muted); text-underline-offset: 3px; }
  .atlas__colhead { margin: 0; padding: 6px var(--frame-gutter); }
  .atlas__tail { padding: 12px var(--frame-gutter) 0; }
  .atlas__sheet .atlas__view-sheet { padding: 0 var(--frame-gutter); }
  .atlas__sheet .atlas__group:first-child { border-top: 0; }
  .atlas__opt { min-height: 44px; font-size: 15px; }
  .atlas__picks { list-style: none; margin: 0; padding: 0; }
  .atlas__pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px;
                 padding: 10px var(--frame-gutter); border: 0; border-bottom: var(--rule-row) solid var(--rule-soft); background: none;
                 cursor: pointer; text-align: left; font-size: 15px; font-weight: 500; color: var(--ink-muted); }
  .atlas__pick[aria-current] { color: var(--ink); font-weight: 700; }
  .atlas__pick[aria-disabled="true"] { color: var(--ink-faint); cursor: default; }
}
@media (hover: none) {
  .atlas__cell:not([aria-disabled="true"]):active, .atlas__rhb:active, .atlas__pick:active, .atlas__ind:active { background: var(--surface-muted); }
}
