/* ==========================================================================
   Xearch — content hub (인사이트 · 블로그 · 가이드 · 이벤트), built on doc.css.
   Pages are written by tools/build_content.py.
   ========================================================================== */

.c-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; font-size: 13px; color: var(--dim); }
.c-crumbs a { color: var(--muted); }
.c-crumbs a:hover { color: var(--text); }
.c-crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.c-head h1 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.2; word-break: keep-all; }
.c-head .d-meta span + span::before { content: "·"; margin-right: 10px; color: var(--line-2); }
.c-head .d-meta .c-state + span::before { content: none; }

.c-tabs { display: flex; gap: 8px; margin: 24px 0 0; overflow-x: auto; scrollbar-width: none; }
.c-tabs::-webkit-scrollbar { display: none; }
.c-tabs a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; transition: color 140ms, background-color 140ms; }
.c-tabs a:hover { color: var(--text); background: rgb(var(--ink) / .05); }
.c-tabs a[aria-current="page"] { color: var(--bg); background: var(--text); box-shadow: none; font-weight: 650; }

/* ---------- Lists ---------- */
.c-list { max-width: var(--maxw); margin: 0 auto; padding: 8px var(--gutter) clamp(64px, 9vw, 120px); }
.c-group { margin: 0 0 44px; }
.c-group h2, .c-group-h h2 { margin: 0 0 14px; font-size: clamp(19px, 2vw, 22px); letter-spacing: -0.02em; }
.c-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.c-group-h a { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.c-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.prose .c-cards { padding: 0; margin: 0; }
.c-card { margin: 0; }
.c-card a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px 20px 18px; border-radius: 18px; text-decoration: none; color: var(--muted); background: rgb(var(--ink) / .035); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 160ms, box-shadow 160ms; }
.c-card a:hover { background: rgb(var(--ink) / .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-card h2, .c-card h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.45; letter-spacing: -0.015em; color: var(--text); font-weight: 680; word-break: keep-all; }
.c-card p { margin: 0; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-tag { align-self: flex-start; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; color: var(--dim); }
.c-card .c-tag + .c-state { margin-top: -4px; }
.c-meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--dim); }
.c-state { display: inline-flex; align-self: flex-start; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-pager { display: flex; gap: 6px; margin-top: 24px; }
.c-pager a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 12px; font-size: 14px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.c-pager a[aria-current="page"] { color: var(--bg); background: var(--text); }

/* ---------- Post ---------- */
.c-post { max-width: 720px; }
.c-cover { margin: 0 0 28px; }
.c-cover img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.c-post h2 { margin: 40px 0 14px; scroll-margin-top: 84px; }
.c-post > h2:first-of-type { margin-top: 32px; }
.c-post code { padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: .9em; color: var(--text); background: rgb(var(--ink) / .08); }
.c-fig { margin: 20px 0; }
.c-fig img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.c-fig figcaption, .c-chart figcaption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--dim); }
.c-cta { margin: 28px 0; }
.c-sum { margin: 44px 0 0; padding: 22px 24px; border-radius: 18px; background: rgb(var(--ink) / .05); box-shadow: inset 0 0 0 1px var(--line-2); scroll-margin-top: 84px; }
.c-sum h2 { margin: 0 0 10px; font-size: 18px; }
.c-sum ul { margin: 0; }
.c-sum li { color: var(--text); }
.c-rel { margin-top: 44px; }
.c-rel h2 { font-size: 18px; margin: 0 0 14px; }
.c-rel .c-cards { grid-template-columns: minmax(0, 1fr); }
.c-event-t td:first-child { width: 28%; white-space: nowrap; }
/* tables of three columns or fewer fit the phone without the doc.css 560px floor; wider ones scroll in .tbl-wrap */
.c-post table:not(:has(th:nth-child(4))) { min-width: 0; }

/* ---------- Chart (one series, horizontal bars; text in text tokens, marks in ink) ---------- */
.c-chart { margin: 24px 0; padding: 20px 20px 16px; border-radius: 18px; background: rgb(var(--ink) / .03); box-shadow: inset 0 0 0 1px var(--line); }
.c-chart-t { margin: 0 0 12px; font-size: 15px; font-weight: 650; color: var(--text); }
.ch { display: block; overflow: visible; }
.ch-lab { font-size: 14px; fill: var(--muted); }
.ch-val { font-size: 14px; font-weight: 650; fill: var(--text); font-variant-numeric: tabular-nums; }
.ch-bar { fill: color-mix(in srgb, var(--text) 45%, var(--bg)); }
.ch-bar.hi { fill: var(--text); }
.ch g:hover .ch-bar { fill: color-mix(in srgb, var(--text) 70%, var(--bg)); }
.ch g:hover .ch-bar.hi { fill: var(--text); }
.c-table { margin-top: 10px; }
.c-table summary { min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.c-table .tbl-wrap { margin-bottom: 4px; }
.c-table table { min-width: 0; }

/* hub pages keep every line at 13px or more (doc.css draws a few labels at 12px) */
.c-page .d-legal, .c-page .toc-t, .c-page .prose thead th, .c-page .d-cols b { font-size: 13px; }
.c-page .c-tag { font-size: 13px; }

@media (max-width: 720px) {
  .c-card a { padding: 18px 16px 16px; }
  .c-sum { padding: 18px 16px; }
  .c-chart { padding: 16px 14px 12px; }
  .c-event-t td:first-child { white-space: normal; }
}
@media (forced-colors: active) { .ch-bar, .ch-bar.hi { fill: CanvasText; } }
