/* Boards, tools and hubs: shared layout and data components */

.phero-row .seg { margin-bottom: 6px; }
.board, .tool { padding-bottom: clamp(56px, 7vw, 96px); }
.board-foot { max-width: 980px; }
.board > .panel + .panel, .board > .grid + .panel, .board > .panel + .grid { margin-top: 16px; }
.board .grid { margin-top: 16px; }

/* toolbar above tables */
.tbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tbar .grow { flex: 1; }
.tbar .lbl { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.search-in { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); min-width: 200px; }
.search-in .i { width: 16px; height: 16px; color: var(--text-3); }
.search-in input { border: 0; background: transparent; outline: none; font-size: 14.5px; width: 100%; }
.sel { height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8199' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E") no-repeat right 10px center; font-size: 14px; font-weight: 560; appearance: none; cursor: pointer; }

/* stats row */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.stat .sl { font-size: 12.5px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .sl img { width: 16px; height: 16px; border-radius: 4px; }
.stat .sv { font-size: 22px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .ss { font-size: 12.5px; color: var(--text-2); }

/* tables in boards */
.tbl-wrap.tall { max-height: min(76vh, 820px); overflow: auto; }
.tbl .star { width: 28px; padding-right: 0; }
.tbl .star button { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-3); border-radius: 6px; }
.tbl .star button[aria-pressed="true"] { color: var(--amber-deep); }
.tbl .star button .i { width: 16px; height: 16px; }
.tbl .star button[aria-pressed="true"] .i { fill: currentColor; }
.tbl td.num, .tbl td.r { font-variant-numeric: tabular-nums; }
.tbl .bar { position: relative; height: 6px; border-radius: 3px; background: var(--bg-sunk); min-width: 80px; }
.tbl .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.tbl .sub { display: block; font-size: 12px; color: var(--text-3); font-weight: 500; }
.tbl tbody tr.fav td:first-child { box-shadow: inset 2px 0 0 var(--amber-deep); }
.tbl th button .i { width: 12px; height: 12px; opacity: .5; }
.tbl th button[aria-sort] .i { opacity: 1; }
.empty-row td { text-align: center; color: var(--text-3); padding: 28px; }

/* canvases for charts inside panels */
.chart-box { position: relative; height: 340px; padding: 8px 10px 12px; }
.chart-box.tall { height: 460px; }
.chart-box.short { height: 240px; }
.chart-box > div, .chart-box > canvas { position: absolute; inset: 8px 10px 12px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 18px 12px; font-size: 12.5px; color: var(--text-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* how / related / cta */
.how { margin-top: clamp(44px, 5vw, 64px); }
.how-body { font-size: 16px; margin-top: 12px; }
.how-body table { font-size: 14.5px; }
.rel-wrap { margin-top: clamp(40px, 5vw, 56px); }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.rel { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); transition: border-color .16s var(--ease), transform .16s var(--ease); }
.rel:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.rel-ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--accent-ink); }
.rel-ic .i { width: 18px; height: 18px; }
.rel b { font-size: 14.5px; font-weight: 650; }
.rel span:last-child { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.cta-band { margin-top: clamp(44px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 26px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line-strong); }
.cta-band b { display: block; font-size: 18px; font-weight: 680; letter-spacing: -.015em; }
.cta-band span { font-size: 14px; color: var(--text-2); }
.cta-band > div { max-width: 44em; display: grid; gap: 4px; }

/* hubs */
.hub { padding-bottom: clamp(64px, 8vw, 110px); }
.hub-g { margin-top: clamp(28px, 4vw, 44px); }
.hub-g .h3 { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 17px; }
.hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hb { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 1px 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); min-height: 108px; transition: border-color .16s var(--ease), transform .16s var(--ease); }
.hb:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.hb-ic { grid-row: span 3; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--accent-ink); }
.hb-ic .i { width: 20px; height: 20px; }
.hb-t { font-weight: 650; font-size: 15.5px; }
.hb-d { font-size: 13px; color: var(--text-3); line-height: 1.45; }
.hb-r { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.hb-r:empty { display: none; }

/* page market strip (Korean data sites keep these numbers on every page) */
.mstrip { border-bottom: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; }
.mstrip .wrap { display: flex; gap: 6px 22px; align-items: center; min-height: 38px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mstrip .wrap::-webkit-scrollbar { display: none; }
.mstrip .ms { display: inline-flex; gap: 7px; align-items: baseline; }
.mstrip .ms span { color: var(--text-3); }
.mstrip .ms b { font-weight: 650; font-variant-numeric: tabular-nums; }
.mstrip .ms em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 12.5px; }

@media (max-width: 1100px) { .hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hub-grid, .rel-grid { grid-template-columns: minmax(0, 1fr); } .hb { min-height: 0; } .search-in { min-width: 0; flex: 1; } .chart-box { height: 280px; } }
