/* Crypto Card Watch — 공용 스타일
   빌드 도구 없음. 이 파일 하나로 전부 처리한다.
   회랑 국가는 네트워크가 느리다. 웹폰트를 안 쓰고 가볍게 유지한다. */

:root {
  --bg:        #fdfdfc;
  --surface:   #f4f6f4;
  --surface-2: #eceeec;
  --ink:       #14201d;
  --ink-2:     #3a4a45;
  --muted:     #5f6c68;
  --faint:     #8b9793;
  --line:      #e4e8e5;
  --line-2:    #cbd3cf;

  --accent:      #0b6e5f;
  --accent-ink:  #075247;
  --accent-soft: #e6f2ee;

  --warn:      #8a5a11;
  --warn-soft: #faf3e4;
  --crit:      #9e3626;
  --crit-soft: #fbece8;

  --maxw:  680px;   /* 본문 — 읽기 좋은 너비 */
  --wide:  880px;   /* 표 — 숨 쉴 공간 */
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0f1614;
    --surface:   #17201d;
    --surface-2: #1e2825;
    --ink:       #e9efec;
    --ink-2:     #c4cfca;
    --muted:     #98a5a0;
    --faint:     #6f7d78;
    --line:      #253029;
    --line-2:    #364540;
    --accent:      #5cc9ad;
    --accent-ink:  #93e0ca;
    --accent-soft: #14302a;
    --warn:      #dda94a;
    --warn-soft: #2a2418;
    --crit:      #e78873;
    --crit-soft: #2f1c18;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard",
               "Apple SD Gothic Neo", "Malgun Gothic", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: -0.005em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

/* 아랍어 RTL — html[dir="rtl"] 이 붙으면 자동 적용 */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .num, [dir="rtl"] code { direction: ltr; unicode-bidi: embed; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}

/* ── 레이아웃 ─────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

header.site {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 48px;
  background: var(--bg);
}
header.site .wrap,
footer.site .wrap { max-width: var(--wide); }
header.site .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.brand {
  font-weight: 700; font-size: 16px; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); }

nav.langs { margin-inline-start: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.langs a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 4px 9px; border-radius: 999px; line-height: 1.4;
}
nav.langs a:hover { background: var(--surface); color: var(--ink); }
nav.langs a[aria-current="true"] {
  color: var(--accent-ink); font-weight: 600; background: var(--accent-soft);
}

main { padding-bottom: 96px; }

/* ── 타이포 ───────────────────────────────────────── */
h1 {
  font-size: clamp(29px, 5.4vw, 40px);
  line-height: 1.18; letter-spacing: -0.035em; font-weight: 700;
  text-wrap: balance; margin: 0 0 18px;
}
h2 {
  font-size: clamp(21px, 3.4vw, 26px);
  line-height: 1.3; letter-spacing: -0.028em; font-weight: 650;
  text-wrap: balance; margin: 64px 0 16px;
  position: relative; padding-top: 4px;
}
/* 굵은 가로줄 대신 짧은 강조 표시 — 문서가 잘게 잘려 보이지 않는다 */
h2::before {
  content: ""; position: absolute; top: -18px; inset-inline-start: 0;
  width: 34px; height: 3px; border-radius: 2px; background: var(--accent);
}
h3 {
  font-size: 17.5px; font-weight: 650; letter-spacing: -0.02em;
  margin: 36px 0 10px; text-wrap: balance;
}
p { margin: 0 0 18px; text-wrap: pretty; }
ul, ol { margin: 0 0 18px; padding-inline-start: 24px; }
li { margin-bottom: 9px; }
li::marker { color: var(--faint); }
strong { font-weight: 650; color: var(--ink); }
small { color: var(--muted); font-size: 13.5px; line-height: 1.65; }
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .88em; background: var(--surface); padding: 1px 5px;
  border-radius: 4px; border: 1px solid var(--line);
}

.lede {
  font-size: clamp(18px, 2.4vw, 20px); line-height: 1.6;
  color: var(--ink-2); margin-bottom: 28px; text-wrap: pretty;
}
.meta { font-size: 13.5px; color: var(--faint); margin-bottom: 32px; }

/* ── 표 ───────────────────────────────────────────── */
/* 표는 본문보다 넓게 — 칸이 좁으면 읽기가 나빠진다 */
.tw {
  overflow-x: auto; margin: 0 0 26px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 920px) {
  .tw {
    width: var(--wide); max-width: var(--wide);
    margin-inline-start: calc((var(--maxw) - var(--wide)) / 2);
  }
}
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 440px; }
thead th {
  text-align: start; font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint);
  padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface); }
td.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ── 박스 ─────────────────────────────────────────── */
.box {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 22px; margin: 0 0 26px; border-radius: var(--radius);
}
.box > :last-child { margin-bottom: 0; }
.box.key  { border-color: var(--accent); background: var(--accent-soft); }
.box.warn { border-color: var(--warn); background: var(--warn-soft); }
.box.crit { border-color: var(--crit); background: var(--crit-soft); }
.box-label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin-bottom: 9px; color: var(--muted);
}
.box.key .box-label  { color: var(--accent-ink); }
.box.warn .box-label { color: var(--warn); }
.box.crit .box-label { color: var(--crit); }

/* 제휴 고지 (구버전 상단 박스) */
.disclosure {
  font-size: 13.5px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: var(--radius); margin: 0 0 30px;
}

/* ── CTA ──────────────────────────────────────────── */
.cta {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 15.5px; line-height: 1.4;
  transition: background .15s ease, transform .15s ease;
}
.cta:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); }

/* 링크를 아직 못 받은 상태. 눌러도 아무 데도 안 간다. */
.cta-pending {
  background: var(--surface); color: var(--muted);
  border: 1px dashed var(--line-2); cursor: not-allowed;
}
.cta-pending:hover { background: var(--surface); color: var(--muted); transform: none; }
.cta-note { font-weight: 400; opacity: .85; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.cta-block {
  margin: 0 0 30px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.cta-block p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.65; }

/* ── 카드 목록 ────────────────────────────────────── */
.cards { display: grid; gap: 14px; margin: 0 0 26px; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  background: var(--bg); text-decoration: none; color: inherit; display: block;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 7px; font-size: 16.5px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* 아직 안 만든 페이지 — 링크 대신 잠긴 카드로 보여준다 */
.card.pending { border-style: dashed; opacity: .68; cursor: default; }
.card.pending:hover { border-color: var(--line); transform: none; }
.card .soon {
  display: inline-block; margin-inline-start: 7px; padding: 1px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: middle;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px;
}

/* ── 상태 배지 — 나라별 카드 가용성 ─────────────────── */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
}
.pill-verified,
.pill-listed { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.pill-blocked { border-color: var(--crit); background: var(--crit-soft); color: var(--crit); }
.pill-notlisted { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }

/* ── 푸터 ─────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line); padding: 32px 0 72px;
  font-size: 13.5px; color: var(--faint); background: var(--surface);
}
footer.site a { color: var(--muted); }
footer.site p { margin: 0 0 9px; }

/* 제휴 고지 미세 문구 — 푸터 맨 아래 */
.fineprint {
  font-size: 11.5px; line-height: 1.65; color: var(--faint);
  margin: 20px 0 0; max-width: 68ch;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .cta:hover, .card:hover { transform: none; }
}
