/* GMC 콘텐츠 발행 현황 대시보드
   토큰은 gmc-guide/public/style.css(실서비스 톤)에서 그대로 가져오고 폭만 넓혔다.
   라임(#d3ff30)은 '면'으로만 쓴다 — 흰 배경 위 글자색으로 쓰면 대비 1.16:1 이라 안 읽힌다.
   달력 농도는 흰색→라임 단일 색상 시퀀셜 램프. '오늘'은 색이 아니라 검정 테두리로 구분한다.
   (색을 두 가지 일에 겹쳐 쓰면 둘 다 죽는다) */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --line: #e2e3e8;
  --line-soft: #ebecf0;
  --text: #101014;
  --text-dim: #5b5c66;
  --text-faint: #8e909b;
  --lime: #d3ff30;
  --lime-deep: #8fbf2e;   /* 흰 배경 위에서 '읽어야 하는' 라임 글자·헤어라인 */
  --ink: #101014;

  --scale-0: #ffffff;
  --scale-1: #f7f8ee;
  --scale-2: #f1f7d2;
  --scale-3: #e6f5a4;
  --scale-4: #d3ff30;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);

  --shadow-card: 0 1px 2px rgba(16, 16, 20, 0.04);
  --shadow-pop: 0 8px 26px rgba(16, 16, 20, 0.13);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.017em;   /* 한글 기본 자간이 넓어서 조인다 */
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4rem;
  background-image: radial-gradient(
    1100px 420px at 6% -180px, rgba(211, 255, 48, 0.38), transparent 70%
  );
  background-repeat: no-repeat;
}

.shell { max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── 헤더 ───────── */
.head { padding: 2.6rem 0 1.4rem; }
.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.13em; color: var(--text-dim); text-transform: uppercase;
  margin-bottom: 0.55rem;
}
h1 {
  font-size: clamp(1.55rem, 1.1rem + 1.7vw, 2.15rem);
  font-weight: 800; line-height: 1.18; letter-spacing: -0.032em;
}
h1 .mark {
  background: linear-gradient(transparent 62%, var(--lime) 62%);
  padding: 0 0.08em;
}
.head-meta {
  margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  font-size: 0.82rem; color: var(--text-dim);
}
.head-meta b { font-weight: 600; color: var(--text); }

/* ───────── 필터 ───────── */
.filters {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 245, 247, 0.93);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  margin-bottom: 1.5rem;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.fgroup { display: flex; gap: 0.3rem; align-items: center; }
.flabel { font-size: 0.74rem; color: var(--text-faint); margin-right: 0.15rem; }

.pill {
  font: inherit; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-dim);
  padding: 0.34rem 0.76rem; border-radius: var(--radius-pill); cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.pill:hover { border-color: #cfd1d8; color: var(--text); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

select, input[type="search"] {
  font: inherit; font-size: 0.8rem; color: var(--text);
  border: 1px solid var(--line); background: var(--surface);
  padding: 0.34rem 0.6rem; border-radius: var(--radius-sm);
}
input[type="search"] { min-width: 190px; }
.spacer { flex: 1 1 auto; }
.reset {
  font: inherit; font-size: 0.78rem; color: var(--text-faint);
  background: none; border: none; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.reset:hover { color: var(--text); }

/* ───────── 카드 ───────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1rem;
}
.card-head { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 1rem; }
.card h2 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.025em; }
.card-sub { font-size: 0.78rem; color: var(--text-faint); }
.card-tools { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ───────── KPI ───────── */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.65rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1rem 1rem;
}
.kpi-label { font-size: 0.74rem; color: var(--text-dim); margin-bottom: 0.28rem; }
.kpi-value { font-size: 1.62rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.kpi-value .unit { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); margin-left: 0.12em; }
.kpi-foot { font-size: 0.74rem; color: var(--text-faint); margin-top: 0.28rem; }
.kpi-foot .up { color: var(--lime-deep); font-weight: 700; }
.kpi-foot .down { color: #c0392b; font-weight: 700; }
.kpi.accent { border-color: var(--ink); }

/* ───────── 달력 ───────── */
.cal-nav { display: flex; align-items: center; gap: 0.3rem; }
.cal-nav button {
  font: inherit; font-size: 0.85rem; line-height: 1; color: var(--text-dim);
  border: 1px solid var(--line); background: var(--surface);
  width: 26px; height: 26px; border-radius: var(--radius-sm); cursor: pointer;
}
.cal-nav button:hover:not(:disabled) { color: var(--text); border-color: #cfd1d8; }
.cal-nav button:disabled { opacity: 0.35; cursor: default; }
.cal-title { font-size: 0.92rem; font-weight: 700; min-width: 8.2rem; text-align: right; }

.cal { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal th {
  font-size: 0.72rem; font-weight: 600; color: var(--text-faint);
  padding-bottom: 0.3rem; text-align: center;
}
.cal th.sun, .cal td.sun .d { color: #c0392b; }
.cal td { padding: 0; }
.cell {
  width: 100%; display: block; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--scale-0); padding: 0.4rem 0.45rem 0.5rem;
  min-height: 60px; transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.cell:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.cell.out { opacity: 0.4; cursor: default; }
.cell.out:hover { transform: none; box-shadow: none; }
.cell.today { border: 2px solid var(--ink); padding: calc(0.4rem - 1px) calc(0.45rem - 1px) calc(0.5rem - 1px); }
.cell.picked { box-shadow: 0 0 0 2px var(--ink) inset; }
/* 날짜는 왼쪽, 그날 합계는 오른쪽 끝. 합계만 칸에서 유일하게 굵다 — 여기가 강조 한 군데다 */
.cell .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 0.3rem; }
.cell .d { font-size: 0.73rem; font-weight: 500; color: var(--text-dim); }
.cell .sum { font-size: 0.88rem; font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--text); }
.cell .bd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.55rem; margin-top: 0.3rem; }
.cell .bd .none { color: #cfd1d8; font-size: 0.85rem; font-weight: 500; }
.sec { display: inline-flex; align-items: center; gap: 0.22rem; font-size: 0.73rem; font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }

/* 지면 색네모. 테두리 없이 색만으로 구분하므로 세 값 다 흰 배경에서 스스로 보여야 한다
   — Bloomberg 는 house GREY(#C9C9C9)로 두면 너무 옅어서 중간 회색으로 내렸다. */
.sq { display: block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sq.original { background: var(--lime); }
.sq.briefing { background: var(--ink); }
.sq.bloomberg { background: #9a9ca6; }
.todaymark { display: block; width: 11px; height: 11px; border-radius: 3px; border: 2px solid var(--ink); }
.legend .lg { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.9rem; }

.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; font-size: 0.72rem; color: var(--text-faint); }
.legend .sw { width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--line-soft); }

/* ───────── 막대 ───────── */
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 5.4rem 1fr 3.1rem; align-items: center; gap: 0.55rem; }
.bar-name { font-size: 0.76rem; color: var(--text-dim); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--surface-2); border-radius: 4px; height: 17px; position: relative; }
.bar-fill { display: block; background: var(--ink); height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; transition: width 0.3s var(--ease); }
.bar-fill.now { background: var(--lime); }
.bar-val { font-size: 0.76rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.bar-row:hover .bar-name { color: var(--text); }

/* ───────── 히트맵 ───────── */
.heat { display: grid; grid-template-columns: 2.1rem repeat(24, 1fr); gap: 2px; }
.heat .hl { font-size: 0.68rem; color: var(--text-faint); display: flex; align-items: center; }
.heat .hc { aspect-ratio: 1; border-radius: 3px; background: var(--scale-0); border: 1px solid var(--line-soft); }
.heat .hh { font-size: 0.6rem; color: var(--text-faint); text-align: center; }

/* ───────── 표 ───────── */
.tbl-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
table.list th {
  text-align: left; font-size: 0.73rem; font-weight: 600; color: var(--text-faint);
  padding: 0.4rem 0.55rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.list th.sortable { cursor: pointer; user-select: none; }
table.list th.sortable:hover { color: var(--text); }
table.list td { padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.list tr:hover td { background: var(--surface-2); }
table.list a { color: var(--text); text-decoration: none; font-weight: 600; }
table.list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nowrap { white-space: nowrap; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.05rem 0.45rem;
}
.tag.free { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag.pick { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.pager { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.8rem; color: var(--text-dim); }
.pager button {
  font: inherit; font-size: 0.8rem; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-dim); padding: 0.25rem 0.7rem; border-radius: var(--radius-sm); cursor: pointer;
}
.pager button:disabled { opacity: 0.35; cursor: default; }
.empty { padding: 2rem 0; text-align: center; color: var(--text-faint); font-size: 0.85rem; }

/* ───────── 툴팁 ───────── */
#tip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0;
  background: var(--ink); color: #fff; font-size: 0.75rem; line-height: 1.5;
  padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
  transition: opacity 0.12s var(--ease); max-width: 260px;
}
#tip.on { opacity: 1; }
#tip b { color: var(--lime); }

footer { margin-top: 1.6rem; font-size: 0.74rem; color: var(--text-faint); line-height: 1.7; }
footer code { font-family: var(--mono); font-size: 0.92em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.05rem 0.3rem; }
