/* ============================================================
   MoneyScoop — 목록 허브 공통 (hub-list)
   14개 목록 허브(briefing·fundamental·cycles·legends·compare·starter-guide·
   faq·real-estate·tax-guide·retirement·crypto·wealth-atlas·scoop-notes·etf-notes)
   가 각자 인라인으로 갖고 있던 487~566줄을 단일 소스로 통합.
   페이지 고유 규칙(.etfnote-* 등)만 각 페이지 인라인에 잔존.

   색은 전부 테마 변수 — 라이트↔다크 토글 즉시 반응 (하드코딩 금지)
   ============================================================ */

/* ============================================================
   CHART ANALYSIS — market-now 레이아웃·스타일 체계 상속
   - page-shell / page-grid / page-main / unified-sidebar
   - HD1 표준 (page-header)
   - lbar1 표준 (live-ticker-bar)
   ============================================================ */

/* 공통 섹션 타이틀 */
.panel-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.15rem; letter-spacing: -0.012em;
  color: var(--text);
}

.area-label, .section-label, .block-label {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  font-weight: 600;
}

/* ── LIVE 뱃지 (lbar1 안에서도 재사용) ── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

.mkt-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.05em; color: var(--text-muted); text-transform: uppercase;
}

.mkt-live-badge__dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand-accent);
  animation: live-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* PAGE GRID · 사이드바 카테고리 룰은 common.css 단일 소스.
   구 인라인에는 `.unified-sidebar:hover` 가 `.post-row__new` 셀렉터 목록에 잘못 끼어 있어
   사이드바 hover 시 font-size:0.6rem 이 자식으로 상속되던 결함이 있었다 — 통합하며 제거 (2026-07-21) */

@keyframes new-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* 관련 링크 */
/* ============================================================
   MAIN CONTENT — HERO / FEATURED / LIST
   ============================================================ */

/* 인트로 블록 (market-now의 mkt-commentary 결) */
.ta-intro { padding: 0; }

.ta-intro__header {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 14px;
}

.ta-intro__block {
  border-left: 2px solid var(--brand-accent);
  background: transparent;
  padding: 8px 16px 8px 20px;
  margin-top: 10px;
}

.ta-intro__oneliner {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  letter-spacing: -0.022em; line-height: 1.22;
  color: var(--text);
  margin-bottom: 14px;
}

.ta-intro__oneliner em {
  color: var(--brand-accent); font-style: italic; font-weight: 400;
}

.ta-intro__overall {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 0.92rem;
}

/* .ta-search__* 검색창 룰은 common.css 의 통합 정의 사용 (단일 소스).
   난이도 칩(.ta-level-chips/.ta-level-chip)은 페이지 고유 — 유지. */
.ta-level-chips {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: none;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.ta-level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.ta-level-chip:hover {
  color: var(--brand-accent);
  background: var(--bg-inset);
}

.ta-level-chip.is-active {
  background: var(--brand-accent);
  color: var(--bg);
}

.ta-level-chip[data-level="basic"].is-active    { background: #10b981; color: #fff; }

.ta-level-chip[data-level="mid"].is-active      { background: var(--brand-accent); color: var(--bg); }

.ta-level-chip[data-level="advanced"].is-active { background: #ef4444; color: #fff; }

.ta-level-chip[data-level="all"].is-active      { background: var(--brand-accent); color: var(--brand-accent-fg); }

@media (max-width: 760px) {
  .ta-level-chips { padding: 2px; gap: 2px; }
  .ta-level-chip { padding: 6px 7px; font-size: 0.72rem; letter-spacing: 0.02em; border-radius: 6px; }
}

@media (max-width: 430px) {
  .ta-level-chips { padding: 2px; gap: 1px; border-radius: 10px; }
  .ta-level-chip { padding: 5px 5px; font-size: 0.66rem; letter-spacing: 0; border-radius: 5px; }
}

@media (max-width: 380px) {
  .ta-level-chip { padding: 5px 4px; font-size: 0.62rem; }
}

/* 카테고리 허브 네비 — 9개 카테고리 허브 페이지로의 진입 카드 그리드
   (인트로와 검색 박스 사이 배치 · 칩/태그가 아닌 "페이지 이동" 어포던스 명확) */
.cat-hub-nav {
  margin: 0 0 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--border);
}

.cat-hub-nav__header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}

.cat-hub-nav__meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cat-hub-nav__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cat-hub-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 0;
  background: var(--brand-accent);
  transition: width 0.22s var(--ease);
}

.cat-hub-card:hover::before { width: 3px; }

.cat-hub-card__num {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 400;
  color: var(--text-faint);
  letter-spacing: -0.02em; line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.cat-hub-card:hover .cat-hub-card__num { color: var(--brand-accent); }

.cat-hub-card__title {
  flex: 1;
  font-size: 0.95rem; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em; line-height: 1.3;
  min-width: 0;
  word-break: keep-all; overflow-wrap: anywhere;
}

.cat-hub-card__count {
  font-style: normal;
  color: var(--brand-accent);
  font-weight: 700;
  margin-left: 2px;
}

.cat-hub-card__arrow {
  font-size: 1rem; font-weight: 600;
  color: var(--brand-accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.cat-hub-card:hover .cat-hub-card__arrow { transform: translateX(3px); }

@media (max-width: 760px) {
  .cat-hub-nav__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cat-hub-card { padding: 9px 10px; gap: 8px; }
  .cat-hub-card__title { font-size: 0.88rem; }
  .cat-hub-card__num { font-size: 1.05rem; }
}

@media (max-width: 380px) {
  .cat-hub-card { padding: 8px 9px; gap: 6px; }
  .cat-hub-card__title { font-size: 0.84rem; }
}

/* 카테고리 탭 (상단 스크롤 탭) */

.ta-cat-tabs__group {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 10px 14px 12px;
  margin-left: 4px;
  border-left: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ta-cat-tabs__group:first-child { border-left: none; margin-left: 0; padding-left: 0; }

/* Featured article */
.post-featured {
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--border);
}

.post-featured__badge {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.post-featured__badge::before {
  content: 'FEATURED';
  color: var(--brand-accent);
}

.post-featured__badge::after {
  content: ''; flex: 1; max-width: 100px; height: 1px; background: var(--border);
}

.post-featured__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  line-height: 1.14; letter-spacing: -0.028em; margin-bottom: 18px;
  word-break: keep-all; overflow-wrap: anywhere;
}

.post-featured__title em {
  font-style: italic; color: var(--brand-accent); font-weight: 400;
}

.post-featured__summary {
  font-size: 1rem; line-height: 1.8; color: var(--text-secondary);
  margin-bottom: 22px; max-width: 720px;
}

.post-featured__meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); letter-spacing: 0.14em;
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
}

/* 리스트 헤더 */
.ta-list-header {
  padding: 14px 0 12px;
  border-bottom: 2px solid var(--text);
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 8px;
}

.ta-list-header > span:first-child {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 400;
  letter-spacing: -0.018em; color: var(--text); line-height: 1;
}

.ta-list-header > span:first-child em {
  font-style: italic; color: var(--brand-accent); font-weight: 400;
}

.ta-list-header .ta-count {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted);
}

.ta-list-header__right .ta-count-note {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint);
}

@media (max-width: 480px) {
  .ta-list-header__right { flex-direction: column; align-items: flex-end; gap: 2px; }
  .ta-list-header__right .ta-count-note { font-size: 0.58rem; letter-spacing: 0.08em; }
}

/* 카테고리 허브 배너 — 포스트 리스트 중간에 카테고리 허브 진입 링크 */
.cat-hub-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  margin: 18px 0 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; border-top: 1px dashed var(--border-subtle); border-bottom: 1px dashed var(--border-subtle); padding: 16px 0; /* 박스 금지 */ }

.cat-hub-banner:hover {
  border-color: var(--brand-accent);
  transform: translateX(2px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cat-hub-banner__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-accent);
  font-weight: 700;
  white-space: nowrap;
}

.cat-hub-banner__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

.cat-hub-banner__arrow {
  font-size: 1.2rem;
  color: var(--brand-accent);
  font-weight: 700;
  transition: transform 0.15s;
}

.cat-hub-banner:hover .cat-hub-banner__arrow { transform: translateX(3px); }

@media (max-width: 640px) {
  .cat-hub-banner {
    grid-template-columns: 1fr auto;
    padding: 12px 14px;
    gap: 8px; border-top: 1px dashed var(--border-subtle); border-bottom: 1px dashed var(--border-subtle); padding: 16px 0; /* 박스 금지 */ }
  .cat-hub-banner__label { grid-column: 1 / 2; font-size: 0.62rem; }
  .cat-hub-banner__title { grid-column: 1 / 3; font-size: 0.9rem; line-height: 1.4; }
  .cat-hub-banner__arrow { grid-row: 1; grid-column: 2; }
}

/* 카드 전 영역 클릭 가능 — 링크 ::before 가 row 전체를 덮음 */
.post-row--linked .post-row__link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-row:hover::before { color: var(--brand-accent); }

.post-row__left { grid-area: left; min-width: 0; }

.post-row__cat::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand-accent);
}

.post-row__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.post-row__link:hover { color: var(--brand-accent); }

.post-row--linked { cursor: pointer; }

.post-row--linked:hover .post-row__title { color: var(--brand-accent-2); }

/* summary & tags: 간결화 대상 — 공간 아끼기 위해 숨김 */
.post-row__summary, .post-row__tags { display: none; }

.post-row__right br { display: none; }

.post-row__time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.post-row__level {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
}

.post-row__level.basic    { color: #10b981; background: rgba(16,185,129,0.10); }

.post-row__level.mid      { color: var(--brand-accent); background: rgba(51, 65, 85,0.10); }

.post-row__level.advanced { color: #ef4444; background: rgba(239,68,68,0.10); }

/* 페이지네이션 */
.ta-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.ta-pager__btn {
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.ta-pager__btn:hover:not(:disabled) { border-color: var(--brand-accent); color: var(--brand-accent); }

.ta-pager__btn:disabled { opacity: 0.35; cursor: default; }

.ta-pager__info {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  min-width: 54px;
  text-align: center;
}

/* 모바일 반응형 */
@media (max-width: 960px) {
}

@media (max-width: 760px) {
.ta-intro__oneliner { font-size: clamp(1.2rem, 5.5vw, 1.55rem); }
  .ta-intro__block { display: none; }
.ta-list-header > span:first-child { font-size: 1.25rem; }
}

/* ============================================================
   CHART ANALYSIS — market-now 레이아웃·스타일 체계 상속
   - page-shell / page-grid / page-main / unified-sidebar
   - HD1 표준 (page-header)
   - lbar1 표준 (live-ticker-bar)
   ============================================================ */

@media (max-width: 600px) {
  }

/* 사이드바 룰은 common.css 단일 소스 — 인라인 제거 (2026-05-31) */
.post-row__new,
.cat-hub-card__new         { margin-left: 8px; font-size: 0.6rem; }

.cat-hub-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  min-width: 0; border-bottom: 1px solid var(--border-subtle); padding: 12px 0; /* 박스 금지 */ }

.cat-hub-card:hover {
  border-color: var(--brand-accent);
  border-left-color: var(--brand-accent);
  background: var(--bg-inset);
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .cat-hub-nav__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cat-hub-card { padding: 9px 10px; gap: 8px; border-bottom: 1px solid var(--border-subtle); padding: 12px 0; /* 박스 금지 */ }
  .cat-hub-card__title { font-size: 0.88rem; }
  .cat-hub-card__num { font-size: 1.05rem; }
}

@media (max-width: 380px) {
  .cat-hub-card { padding: 8px 9px; gap: 6px; border-bottom: 1px solid var(--border-subtle); padding: 12px 0; /* 박스 금지 */ }
  .cat-hub-card__title { font-size: 0.84rem; }
}

.ta-list-header__right {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: flex-end;
}

.ta-count-group { display: inline-flex; align-items: baseline; gap: 8px; }

@media (max-width: 480px) {
  .ta-list-header__right { gap: 10px; }
  .ta-list-header__right .ta-count-note { font-size: 0.58rem; letter-spacing: 0.08em; }
}

/* 보기 방식 스위치 — ON=간단히(compact) / OFF=자세히(full) · 양 테마 thumb 대비 보장 */
.notes-view-switch {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 0;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
  transition: color 0.15s;
}

.notes-view-switch:hover { color: var(--text); }

.notes-view-switch__track {
  position: relative; width: 34px; height: 18px; border-radius: 999px;
  background: var(--text-faint); transition: background 0.18s; flex-shrink: 0;
}

.notes-view-switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fafafa; border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: transform 0.18s;
}

.notes-view-switch[aria-checked="true"] { color: var(--brand-accent); font-weight: 700; }

.notes-view-switch[aria-checked="true"] .notes-view-switch__track { background: var(--brand-accent); }

.notes-view-switch[aria-checked="true"] .notes-view-switch__thumb { transform: translateX(16px); }

.notes-view-switch:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 3px; border-radius: 4px; }

/* 간단히 보기 — summary·tags 숨김, 한 줄 카드 */
.post-list.is-compact .post-row { padding: 12px 0; }

.post-list.is-compact .post-row__summary,
.post-list.is-compact .post-row__tags { display: none; }

.post-list.is-compact .post-row__title { font-size: 0.96rem; }

/* 포스트 행 */
/* 포스트 리스트 — 제목·시간·난이도 prominence 강조, 여백 간결화 */
/* 번호는 data-num attribute (JS 가 페이지 글로벌 인덱스로 주입 — 페이지 2도 16번부터 정확히 시작) */
.post-row {
  display: grid;
  grid-template-columns: 92px 1fr 96px;
  grid-template-areas: "date left right";
  gap: 16px;
  padding: 20px 0;
  align-items: start;
  border-bottom: 1px solid var(--border-subtle);
  transition: opacity 0.15s, background 0.15s, padding-left 0.15s var(--ease);
  position: relative;
}

.post-row:hover { background: rgba(51, 65, 85,0.02); padding-left: 6px; }

.post-row__date {
  grid-area: date;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
  padding-top: 4px;
  white-space: nowrap;
  transition: color 0.15s;
}

.post-row:hover .post-row__date { color: var(--brand-accent); }

.post-row__right { grid-area: right; }

.post-row__cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}

.post-row__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
  line-height: 1.42;
  margin: 0 0 8px;
  color: var(--brand-accent);
  word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-row__summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* 데스크탑 전용 — 모바일은 pages.css 의 row 가로 배치 적용 (2026-06-01 fix) */
@media (min-width: 761px) {
  .post-row__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-top: 2px;
  }
}

.post-row__right .post-row__time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-row__right .post-row__level {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 3px;
}

/* 완결 시리즈 뱃지 — 녹색 아웃라인(완성·양 테마 AA), NEW(브랜드 채움)와 시각 구분 */
.cat-hub-card__done        { display: inline-block; margin-left: 8px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; padding: 1px 5px; border-radius: 3px; border: 1px solid #10b981; color: #10b981; background: transparent; vertical-align: middle; }

/* ════════════════════════════════════════════════════════════
   목록 표준 리디자인 (2026-07-21) — 좌측 인덱스 레일 + dateline
   메인 1C "구조 인덱스"와 같은 디자인 언어.
   .page-grid--rail 변형 클래스만 사용 — 공통 .page-grid 는 불변이라
   개별 글 387편은 영향 없음. 되돌리기 = 클래스 제거.
   ════════════════════════════════════════════════════════════ */

/* ── 좌측 레일 전환 ───────────────────────────────────────── */
.page-grid--rail { grid-template-columns: 300px minmax(0, 1fr); gap: 0; }
.page-grid--rail .unified-sidebar {
  order: -1;
  padding: 22px 20px 28px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
}
.page-grid--rail .page-main { padding: 22px 4px 28px 30px; }

/* 레일 활성 카테고리 — 배경·텍스트색만으로 강조 (한쪽 면 컬러 보더 금지) */
.page-grid--rail .side-hub__item.is-active {
  background: var(--bg-panel);
  border-radius: 8px;
}
.page-grid--rail .side-hub__item.is-active .side-hub__name { color: var(--brand-accent); font-weight: 700; }

/* ── 본문 브레드크럼 (HD1 헤더 아래 · JSON-LD BreadcrumbList 와 동기) ── */
.hub-crumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--text-faint);
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-subtle);
}
.hub-crumb a { color: var(--text-muted); text-decoration: none; }
.hub-crumb a:hover { color: var(--brand-accent); }
.hub-crumb__home { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--brand-accent); }
.hub-crumb__sep { color: var(--border-strong); }
.hub-crumb__here { color: var(--text); font-weight: 700; }

/* ── 카테고리 UI 를 레일로 일원화 ──────────────────────────
   상단 인라인 탭은 시각적으로 감추되 DOM 에는 남긴다.
   hub-sidebar-filter.js 가 레일 클릭을 이 탭 버튼 클릭으로 위임하고,
   common.js 가 #taCatTabs 에 버튼을 생성하는 계약이라 제거하면 필터가 죽는다. */
.page-grid--rail .ta-cat-tabs--inline { display: none; }

/* ── 필터 바 sticky ───────────────────────────────────────── */
/* top = .site-header 높이(64px) + 하단 보더 1px. 헤더가 sticky top:0 이라 그 아래에 붙는다.
   ≤1024px 에서는 아래 미디어쿼리가 static 으로 되돌린다 (헤더 높이가 구간마다 달라짐). */
.ta-search--sticky {
  position: sticky; top: 65px; z-index: 5;
  background: var(--bg);
  padding-top: 10px; margin-top: -10px;
}

/* ── 레일 난이도 범례 ─────────────────────────────────────── */
.side-legend { display: flex; flex-direction: column; gap: 7px; }
.side-legend__row { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-secondary); }
.side-legend__pill {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 3px; border: 1px solid currentColor; flex: none;
}
/* pill 색은 기존 .post-row__level 과 동일 의미 색 — 범례가 실제 뱃지와 어긋나면 안 됨 */
.side-legend__row--basic .side-legend__pill { color: #10b981; }
.side-legend__row--mid .side-legend__pill { color: var(--accent-warm); }
.side-legend__row--advanced .side-legend__pill { color: #ef4444; }

/* ── 레일 함께 보기 ───────────────────────────────────────── */
.side-pair { display: flex; flex-direction: column; gap: 8px; }
.side-pair__link { display: inline-flex; align-items: baseline; gap: 7px; font-size: 0.84rem; font-weight: 700; color: var(--text); text-decoration: none; }
.side-pair__link:hover { color: var(--brand-accent); }
.side-pair__link small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); font-weight: 500; }

/* ── dateline 행 — 날짜열 확장 (92 → 104px · YYYY·MM·DD) ──── */
.post-row { grid-template-columns: 104px 1fr 96px; }
/* 날짜 표기는 기존 ISO(2026-07-16) 유지 — 프로토타입의 'YYYY·MM·DD' 는
   sort_hub_posts.py·new_post.py 생성 포맷과 물려 있어 이번 범위에서 제외 */
.post-row__date { line-height: 1.35; font-variant-numeric: tabular-nums; }

/* ── ≤1024px (태블릿·폴드·모바일) — 레일 해체, 콘텐츠 우선 ──
   CLAUDE.md 4-tier 기준 1025px+ 만 풀 3컬럼. 그 아래는 단일 컬럼으로
   카테고리를 가로 칩바로 축약해 목록 위에 두고, 참조성 블록은 목록 뒤로 보낸다. */
@media (max-width: 1024px) {
  .page-grid--rail { display: flex; flex-direction: column; }
  .page-grid--rail .unified-sidebar,
  .page-grid--rail .side-block--cats { display: contents; }
  .page-grid--rail .page-main { padding: 18px 0 28px; order: 2; }

  /* 레일 내용물이 flex 아이템이 되므로 순서를 직접 지정.
     카테고리 블록은 common.js 가 .page-main 의 검색 바 위로 옮기므로
     여기서 order 로 끌어올리지 않는다 — 그렇게 하면 브레드크럼보다 위로 간다. */
  .page-grid--rail > * > * > * { order: 5; }

  /* 구분선은 flex 아이템으로 흩어지므로 감추고, 섹션에 헤어라인을 준다 */
  .page-grid--rail .side-divider { display: none; }
  .page-grid--rail .side-block--cats > .side-section {
    padding-top: 18px; margin-top: 18px;
    border-top: 1px dashed var(--border-subtle);
  }
  .page-grid--rail .side-block--cats > .side-section:first-child {
    padding-top: 0; margin-top: 0; border-top: 0;
  }

  /* 검색 바 위로 이사한 카테고리 블록 — 본문 흐름에 맞춘 여백 */
  .side-section--inflow { margin: 0 0 4px; }
  /* 라벨은 바로 위 페이지 제목과 같은 말이라 감춘다 (칩만으로 충분) */
  .side-section--inflow > .side-section__title,
  .side-section--inflow > .side-hub__sub { display: none; }

  /* 카테고리 인덱스 → 가로 스크롤 칩바 (터치 타깃 44px) */
  .page-grid--rail .side-hub {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 10px 0; scrollbar-width: none;
  }
  .page-grid--rail .side-hub::-webkit-scrollbar { display: none; }
  .page-grid--rail .side-hub__item {
    flex: none; gap: 6px; padding: 9px 14px; min-height: 44px;
    border: 1px solid var(--border); border-radius: 999px; white-space: nowrap;
  }
  .page-grid--rail .side-hub__item.is-active { background: var(--bg-inset); }
  .page-grid--rail .side-hub__num,
  .page-grid--rail .side-hub__sub { display: none; }

  .ta-search--sticky { position: static; margin-top: 0; }
}
