/* 퍼프덱스허브 — 업비트 공개 웹 관측값 기반(밝은 캔버스 + 흰 패널, 0/4px 모서리, 파란 강조) */
:root {
  --accent: #0062df;
  --accent-deep: #003597;
  --rise: #dd3c44;
  --fall: #1375ec;
  --ink: #1a2434;
  --body: #333333;
  --muted: #565d6a;
  --border: #d6d8db;
  --line: #e7e9ec;
  --surface: #ffffff;
  --canvas: #e9ecf1;
  --control: #f4f5f7;
  --disabled: #8e929b;
  --font: Roboto, "Noto Sans KR", -apple-system, AppleSDGothicNeo-Regular, "Apple SD Gothic Neo", "Malgun Gothic", Dotum, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--body);
  font: 400 14px/21px var(--font); word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 상단 바 */
.gnb { background: var(--accent-deep); color: #fff; }
.gnb .wrap { display: flex; align-items: center; gap: 40px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.2px; white-space: nowrap; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo small { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.6); }
.gnb nav { display: flex; gap: 28px; }
.gnb nav a { font-size: 15px; line-height: 22px; color: rgba(255,255,255,.6); white-space: nowrap; }
.gnb nav a:hover, .gnb nav a:active { font-weight: 500; color: rgba(255,255,255,.85); }
.gnb nav a[aria-current="page"] { color: #fff; font-weight: 500; }

/* 패널 */
.panel { background: var(--surface); margin-top: 10px; }
.panel-pad { padding: 28px 30px; }
.notice-panel { background: var(--surface); padding: 48px 45px 45px; box-shadow: #dee1e7 2px 2px 4px 0; margin-top: 10px; }
main { padding-bottom: 40px; }

/* 히어로 */
.hero h1 { margin: 0; font-size: 26px; line-height: 36px; color: var(--ink); font-weight: 700; letter-spacing: -0.4px; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 24px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 22px; border-top: 1px solid var(--line); }
.hero-stats div { padding: 14px 28px 0 0; margin-right: 28px; }
.hero-stats dt { font-size: 12px; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; color: var(--ink); }
.hero-stats dd em { font-style: normal; color: var(--accent); }

/* 탭 */
.tabs { display: flex; border-bottom: 1px solid #dddddd; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; min-width: 110px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; height: 45px; font: 500 16px/42px var(--font); color: var(--body); cursor: pointer; padding: 0 16px; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

/* 거래소 표 */
.dex-table { width: 100%; border-collapse: collapse; }
.dex-table th { font-size: 12px; font-weight: 400; color: var(--muted); text-align: center; padding: 12px 10px; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dex-table th:first-child { text-align: left; padding-left: 24px; }
.dex-table td { padding: 16px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.dex-table td:first-child { text-align: left; padding-left: 24px; }
.dex-table tr:last-child td { border-bottom: 0; }
.dex-table tbody tr:hover { background: #f7f9fc; }
.sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sort::after { content: " ↕"; color: var(--disabled); }
.sort[data-dir="asc"]::after { content: " ↑"; color: var(--accent); }
.sort[data-dir="desc"]::after { content: " ↓"; color: var(--accent); }

.ex { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.ex-logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font: 700 14px/1 var(--font); color: #fff; letter-spacing: -0.5px; }
.ex-logo img { width: 40px; height: 40px; object-fit: contain; }
.ex-name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 22px; }
.ex-name:hover { color: var(--accent); }
.ex-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font-size: 11px; line-height: 18px; padding: 0 6px; border: 1px solid var(--border); color: var(--muted); border-radius: 2px; white-space: nowrap; }
.chip.blue { border-color: #b9d3f5; color: var(--accent); background: #f2f7fe; }

.benefit { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 28px; }
.benefit-sub { font-size: 12px; color: var(--muted); line-height: 16px; margin-top: 2px; }
.benefit.none { font-size: 14px; font-weight: 500; color: var(--disabled); }
.fee s { display: block; font-size: 12px; color: var(--disabled); line-height: 16px; }
.fee b { font-size: 15px; color: var(--ink); font-weight: 700; }
.fee .zero { color: var(--accent); }

.code-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 1px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 4px; font: 500 13px/1 var(--font); cursor: pointer; white-space: nowrap; }
.code-btn:hover { border-color: var(--accent); }
.code-btn svg { width: 13px; height: 13px; color: var(--muted); }
.code-btn.copied { border-color: var(--accent); color: var(--accent); }
.code-none { font-size: 12px; color: var(--disabled); }

.btns { display: flex; gap: 6px; justify-content: flex-end; padding-right: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 4px; font: 500 14px/1 var(--font); white-space: nowrap; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0052bc; }
.btn-line { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 16px; }
.btn svg { width: 12px; height: 12px; }

.table-foot { padding: 14px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); line-height: 19px; }
.table-foot a { color: var(--accent); }

/* 본문 섹션 */
.sec h2 { margin: 0 0 14px; font-size: 20px; line-height: 28px; color: var(--ink); font-weight: 700; }
.sec h3 { margin: 22px 0 8px; font-size: 16px; color: var(--ink); }
.sec p { margin: 0 0 10px; line-height: 24px; }
.sec ul, .sec ol { margin: 0 0 10px; padding-left: 20px; line-height: 24px; }
.sec li { margin-bottom: 4px; }
.sec a { color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.steps li { counter-increment: s; background: var(--control); padding: 16px; margin: 0 !important; }
.steps li::before { content: counter(s); display: block; width: 24px; height: 24px; line-height: 24px; text-align: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.steps b { display: block; color: var(--ink); margin-bottom: 4px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-size: 15px; font-weight: 500; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--body); }

/* 상세 페이지 */
.crumb { font-size: 12px; color: var(--muted); padding: 14px 0 0; }
.crumb a:hover { color: var(--accent); }
.dex-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dex-head .ex-logo { width: 56px; height: 56px; font-size: 18px; }
.dex-head .ex-logo img { width: 56px; height: 56px; }
.dex-head h1 { margin: 0; font-size: 26px; line-height: 34px; color: var(--ink); }
.dex-head p { margin: 2px 0 0; color: var(--muted); }
.dex-head .cta { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.facts { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.facts th, .facts td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts th { width: 160px; background: #f9fafb; color: var(--muted); font-weight: 400; font-size: 13px; }
.facts td { color: var(--ink); }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.cmp th { background: #f9fafb; color: var(--muted); font-weight: 400; }
.cmp td:first-child, .cmp th:first-child { text-align: left; }
.cmp a { color: var(--ink); font-weight: 500; }
.cmp a:hover { color: var(--accent); }
.scroll-x { overflow-x: auto; }
.callout { background: #f2f7fe; border-left: 3px solid var(--accent); padding: 14px 16px; margin: 0 0 14px; line-height: 23px; }
.callout.warn { background: #fdf3f3; border-left-color: var(--rise); }
.sources { font-size: 12px; color: var(--muted); line-height: 20px; }
.sources a { color: var(--muted); text-decoration: underline; }

/* 푸터 */
footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 12px; color: var(--muted); line-height: 20px; }
footer .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
footer .links a { color: var(--ink); }
footer .links a:hover { color: var(--accent); }
footer p { margin: 0 0 6px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
.toast.show { opacity: 1; }

/* 모바일: 표 행 → 카드 */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .gnb .wrap { gap: 18px; height: 54px; }
  .logo small { display: none; }
  .gnb nav { gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .gnb nav a { font-size: 14px; }
  .panel-pad { padding: 22px 16px; }
  .notice-panel { padding: 26px 16px; }
  .hero h1 { font-size: 21px; line-height: 30px; }
  .hero p { font-size: 14px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .hero-stats div { padding-right: 0; margin-right: 0; }
  .hero-stats dd { font-size: 16px; line-height: 22px; }
  .hero-stats div:nth-child(3) { grid-column: 1 / -1; }
  .dex-table thead { display: none; }
  .dex-table, .dex-table tbody, .dex-table tr, .dex-table td { display: block; width: 100%; }
  .dex-table tr { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 16px; border-bottom: 1px solid var(--line); gap: 12px 8px; }
  .dex-table tr:last-child { border-bottom: 0; }
  .dex-table td { padding: 0; border: 0; text-align: left; }
  .dex-table td:first-child { grid-column: 1 / -1; padding: 0; }
  .dex-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
  .dex-table td.c-code { grid-column: 1 / 2; }
  .dex-table td.c-act { grid-column: 2 / -1; align-self: end; }
  .benefit { font-size: 19px; }
  .btns { padding: 0; justify-content: stretch; }
  .btns .btn { flex: 1; }
  .ex { min-width: 0; }
  .steps { grid-template-columns: 1fr; }
  .dex-head .cta { margin-left: 0; width: 100%; }
  .facts th { width: 108px; }
  .table-foot { padding: 14px 16px; }
}
@media (max-width: 400px) {
  .gnb .wrap { gap: 14px; }
  .logo span { font-size: 16px; }
  .gnb nav a.opt { display: none; }
}
.benefit.txt { font-size: 16px; line-height: 22px; }
