/* Chord design system. Bright, dollar-native, one straight line across an arc.
   Fonts: Sora (display, numbers) + Inter (text). Prefix: ch-. Trade panel keeps
   tp- hooks, image picker keeps ip- hooks. */
:root {
  --bg: #ffffff;
  --ink: #0a1633;
  --ink-2: #2f3a55;
  --mute: #5f6a83;
  --line: rgba(10, 22, 51, 0.10);
  --line-2: rgba(11, 95, 255, 0.22);
  --card: #ffffff;
  --soft: #f3f6ff;
  --soft-2: #eef9f2;
  --blue: #0b5fff;
  --violet: #7b2ff7;
  --green: #00c853;
  --green-ink: #00933d;
  --orange: #ffa800;
  --red: #ff3b30;
  --grad: linear-gradient(135deg, #0b5fff 0%, #7b2ff7 100%);
  --grad-2: linear-gradient(135deg, #00c853 0%, #0b5fff 100%);
  --shadow: 0 12px 34px rgba(11, 95, 255, 0.10), 0 1px 2px rgba(10, 22, 51, 0.06);
  --shadow-lg: 0 24px 60px rgba(11, 95, 255, 0.16), 0 2px 6px rgba(10, 22, 51, 0.08);
  --r: 16px;
  --r-sm: 10px;
  --header: 64px;
  --w: 1160px;
  --display: "Sora", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 15px/1.55 var(--text); font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(11, 95, 255, 0.16), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(123, 47, 247, 0.14), transparent 60%),
    radial-gradient(700px 420px at 50% 110%, rgba(0, 200, 83, 0.12), transparent 60%),
    #ffffff;
}
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
h1 { font-size: 40px; font-weight: 700; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.ch-num, .tp-out, .tp-input { font-family: var(--display); font-variant-numeric: lining-nums tabular-nums; }
.ch-mute { color: var(--mute); }
.ch-small { font-size: 12px; }
.ch-up { color: var(--green-ink); }
.ch-down { color: var(--red); }
.ch-grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ch-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.ch-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.18); animation: ch-pulse 1.8s ease-out infinite; }
@keyframes ch-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.4); } 100% { box-shadow: 0 0 0 9px rgba(0, 200, 83, 0); } }

/* ---- layout ---- */
.ch-wrap { max-width: var(--w); margin: 0 auto; padding: 0 16px; }
.ch-main { max-width: var(--w); margin: 0 auto; padding: 28px 16px 64px; }
.ch-two { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.ch-two-rev { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ch-stack { display: grid; gap: 16px; }
.ch-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ch-sticky { position: sticky; top: calc(var(--header) + 16px); }

/* ---- header ---- */
.ch-header-ph { height: var(--header); }
.ch-header { position: sticky; top: 0; z-index: 30; height: var(--header); background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); }
.ch-header-in { max-width: var(--w); margin: 0 auto; padding: 0 16px; height: 100%; display: flex; align-items: center; gap: 22px; }
.ch-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.ch-brand svg { width: 30px; height: 30px; display: block; }
.ch-nav { display: flex; gap: 4px; }
.ch-nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 10px; position: relative; transition: background 0.15s, color 0.15s; }
.ch-nav a:hover { background: var(--soft); color: var(--ink); }
.ch-nav a.is-on { color: var(--ink); background: var(--soft); }
.ch-nav a.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--grad); }
.ch-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ch-header .ch-burger { display: none; }

/* ---- buttons ---- */
.ch-btn, .tp-btn, .ip-btn, .ch-copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink);
  font: 500 13px/1 var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.ch-btn:hover, .tp-btn:hover, .ip-btn:hover, .ch-copy:hover { border-color: var(--line-2); background: var(--soft); }
.ch-btn:active, .tp-btn:active { transform: translateY(1px); }
.ch-btn:focus-visible, .tp-btn:focus-visible, .ip-btn:focus-visible, .ch-copy:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ch-btn-primary, .tp-btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(11, 95, 255, 0.28); }
.ch-btn-primary:hover, .tp-btn-primary:hover { background: var(--grad); filter: brightness(1.06); box-shadow: 0 10px 26px rgba(123, 47, 247, 0.32); }
.ch-btn-green { background: var(--grad-2); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(0, 200, 83, 0.25); }
.ch-btn-green:hover { background: var(--grad-2); filter: brightness(1.06); }
.ch-btn-soft { background: var(--soft); border-color: transparent; color: var(--blue); }
.ch-btn-soft:hover { background: #e7edff; }
.ch-btn-lg { height: 42px; padding: 0 18px; font-size: 14px; }
.ch-btn.is-connected { border-color: rgba(0, 200, 83, 0.5); background: var(--soft-2); color: var(--green-ink); }
.ch-btn:disabled, .tp-btn:disabled, .ip-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; filter: none; }
.ch-copy { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.ch-copy.is-ok { border-color: rgba(0, 200, 83, 0.5); color: var(--green-ink); background: var(--soft-2); }
.ch-btn svg, .ch-copy svg { flex: none; }

/* ---- cards, chips, tiles ---- */
.ch-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: 0 1px 2px rgba(10, 22, 51, 0.04); }
.ch-card-hover { transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.ch-card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.ch-card.is-fresh { animation: ch-tremble 0.55s ease; box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.45), var(--shadow); }
@keyframes ch-tremble { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.ch-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.ch-chip.is-up { background: rgba(0, 200, 83, 0.14); color: var(--green-ink); }
.ch-chip.is-down { background: rgba(255, 59, 48, 0.12); color: #d92d23; }
.ch-chip.is-blue { background: rgba(11, 95, 255, 0.12); color: var(--blue); }
.ch-chip.is-violet { background: rgba(123, 47, 247, 0.12); color: var(--violet); }
.ch-chip.is-orange { background: rgba(255, 168, 0, 0.16); color: #b26f00; }
.ch-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ch-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.ch-tile b { display: block; font: 700 20px/1.2 var(--display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tile span { display: block; margin-top: 4px; color: var(--mute); font-size: 12px; }
.ch-tile.is-accent { background: var(--grad); border-color: transparent; color: #fff; }
.ch-tile.is-accent span { color: rgba(255, 255, 255, 0.82); }
.ch-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--soft); display: grid; place-items: center; font: 700 18px var(--display); color: var(--blue); flex: none; border: 1px solid var(--line); }
.ch-logo-lg { width: 72px; height: 72px; border-radius: 18px; font-size: 26px; }
.ch-hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.ch-kv { display: grid; gap: 8px; margin: 0; }
.ch-kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.ch-kv dt { color: var(--mute); }
.ch-kv dd { margin: 0; font-weight: 600; text-align: right; }
.ch-arc { display: block; }

/* ---- hero (feed) ---- */
.ch-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 28px; align-items: center; padding: 30px 0 26px; }
.ch-hero h1 { font-size: 52px; line-height: 1.04; letter-spacing: -0.03em; margin: 12px 0 14px; }
.ch-hero .ch-lede { font-size: 17px; color: var(--ink-2); max-width: 540px; margin-bottom: 20px; }
.ch-hero-art { position: relative; min-height: 300px; }
.ch-hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 40px rgba(11, 95, 255, 0.18)); }
.ch-hero-art .ch-float { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 12px; color: var(--mute); }
.ch-hero-art .ch-float b { display: block; font: 700 18px var(--display); color: var(--ink); }
.ch-hero-art .ch-float.f1 { left: 4%; top: 12%; }
.ch-hero-art .ch-float.f2 { right: 2%; top: 44%; }
.ch-hero-art .ch-float.f3 { left: 18%; bottom: 6%; }
@keyframes ch-draw { to { stroke-dashoffset: 0; } }
.ch-hero-art .ch-draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: ch-draw 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s forwards; }
.ch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 26px; }
.ch-feedbar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.ch-feedbar .ch-eyebrow { white-space: nowrap; }
.ch-feedbar h2 { font-size: 22px; }
.ch-feedbar .ch-mute { margin-left: auto; font-size: 13px; }
.ch-state { color: var(--mute); font-size: 14px; margin: 8px 0 14px; min-height: 1.2em; }

/* ---- token card ---- */
.ch-tok { display: grid; gap: 12px; padding: 16px; }
.ch-tok-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ch-tok-top .ch-name { min-width: 0; flex: 1; }
.ch-tok-top .ch-name a { font-family: var(--display); font-weight: 600; font-size: 16px; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tok-top .ch-name a:hover { color: var(--blue); }
.ch-tok-top .ch-name span { color: var(--mute); font-size: 12px; }
.ch-tok-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-tok-price b { font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.ch-tok-price small { font-size: 12px; color: var(--mute); }
.ch-tok-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ch-tok-mini div { background: var(--soft); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.ch-tok-mini b { display: block; font: 600 14px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tok-mini span { font-size: 11px; color: var(--mute); }
.ch-tok-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ch-tok-foot .ch-chip { height: 22px; font-size: 11px; }
.ch-tok-foot .ch-spacer { flex: 1; }

/* ---- token page ---- */
.ch-tk-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ch-tk-head > div { min-width: 0; }
.ch-tk-head h1 { font-size: 30px; }
.ch-tk-head h1 span { color: var(--mute); font-weight: 500; font-size: 20px; }
.ch-tk-addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--mute); }
.ch-tk-addr code { background: var(--soft); padding: 4px 8px; border-radius: 8px; color: var(--ink-2); word-break: break-all; white-space: normal; max-width: 100%; }
.ch-embed { width: 100%; height: 460px; border: 0; border-radius: 12px; background: #0a1633; display: block; }
.ch-spark { width: 100%; height: 120px; display: block; }
.ch-panel-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ch-panel-hd h3 { flex: 1; }
.ch-earn p { font-size: 14px; }
.ch-inline-input { width: 70px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; }

/* ---- forms ---- */
.ch-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.ch-field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ch-field label small { font-weight: 400; color: var(--mute); }
.ch-field input, .ch-field textarea, .ch-field select { font: inherit; padding: 0 12px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); width: 100%; transition: border-color 0.15s, box-shadow 0.15s; }
.ch-field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.ch-field input:focus, .ch-field textarea:focus, .ch-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 95, 255, 0.14); outline: 0; }
.ch-field .ch-hint { font-size: 12px; color: var(--mute); }
.ch-err { color: var(--red); font-size: 12px; min-height: 1em; }
.ch-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ch-sheet dl { margin: 0; }
.ch-sheet .ch-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; }
.ch-sheet .ch-total b { font: 700 20px var(--display); }
.ch-sheet-title { font: 600 16px var(--display); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ch-ready { display: inline-flex; align-items: center; gap: 6px; color: var(--green-ink); font-weight: 600; font-size: 13px; }
.ch-notice { background: var(--soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.ch-notice.is-orange { background: rgba(255, 168, 0, 0.12); border-color: rgba(255, 168, 0, 0.4); }

/* ---- tables ---- */
.ch-table-wrap { overflow-x: auto; }
table.ch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ch-table th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ch-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ch-table tr:last-child td { border-bottom: 0; }

/* ---- learn ---- */
.ch-learn-nav { display: grid; gap: 4px; }
.ch-learn-nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.ch-learn-nav a i { width: 22px; height: 22px; border-radius: 7px; background: var(--soft); color: var(--blue); font: 600 11px var(--display); display: grid; place-items: center; font-style: normal; }
.ch-learn-nav a:hover { background: var(--soft); }
.ch-learn-nav a[aria-current] { background: var(--soft); color: var(--ink); font-weight: 600; }
.ch-learn-nav a[aria-current] i { background: var(--grad); color: #fff; }
.ch-article h1 { font-size: 30px; margin-bottom: 14px; }
.ch-article p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.ch-article .ch-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* ---- footer, toast, stamp ---- */
.ch-footer { border-top: 1px solid var(--line); padding: 22px 16px 32px; color: var(--mute); font-size: 13px; background: rgba(255, 255, 255, 0.6); }
.ch-footer-in { max-width: var(--w); margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.ch-footer nav { display: flex; gap: 14px; }
.ch-footer nav a { text-decoration: none; }
.ch-footer nav a:hover { color: var(--blue); }
.ch-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13px; transition: 0.2s; z-index: 50; max-width: 90vw; box-shadow: var(--shadow-lg); }
.ch-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.ch-stamp { position: fixed; right: 14px; top: calc(var(--header) + 12px); z-index: 40; background: var(--orange); color: #3a2600; font: 700 11px/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; box-shadow: 0 8px 18px rgba(255, 168, 0, 0.35); }

/* ---- trade panel (tp- hooks from trade.js) ---- */
.tp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tp-tab { font: 600 13px var(--text); padding: 8px 0; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--mute); }
.tp-tab.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(10, 22, 51, 0.12); }
.tp-tab[data-tab="buy"].is-on { color: var(--green-ink); }
.tp-tab[data-tab="sell"].is-on { color: var(--red); }
.tp-leg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0; background: #fff; }
.tp-leg-top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--mute); }
.tp-bal { margin-left: auto; }
.tp-btn-max { height: 24px; padding: 0 8px; font-size: 11px; }
.tp-amt { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tp-input { flex: 1; font-size: 24px; font-weight: 600; border: 0; outline: 0; background: transparent; min-width: 0; color: var(--ink); }
.tp-input::placeholder { color: #b7bdcc; }
.tp-out { flex: 1; font-size: 24px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tp-asset { font-weight: 600; font-size: 13px; background: var(--soft); border-radius: 8px; padding: 6px 10px; }
.is-dim { color: #b7bdcc; }
.tp-mid { height: 0; }
.tp-facts { display: grid; gap: 6px; font-size: 13px; margin: 12px 0; }
.tp-fact { display: flex; justify-content: space-between; gap: 10px; }
.tp-fact dt { color: var(--mute); }
.tp-fact dd { margin: 0; font-weight: 600; }
.is-down { color: var(--red); }
.tp-hint { font-size: 12px; color: var(--mute); margin: 0 0 10px; }
.tp-slip { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--mute); gap: 8px; flex-wrap: wrap; }
.tp-seg { display: flex; gap: 4px; }
.tp-seg button { font: 600 11px var(--text); padding: 5px 8px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; color: var(--ink-2); }
.tp-seg button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tp-custom { display: flex; gap: 8px; align-items: center; font-size: 12px; margin: 8px 0; }
.tp-custom input { width: 70px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; }
.tp-steps { display: flex; gap: 8px; align-items: center; font-size: 12px; margin: 10px 0; color: var(--ink-2); }
.tp-steps i { font-style: normal; flex: 1; }
.tp-act { margin-top: 12px; }
.tp-act .tp-btn { width: 100%; height: 44px; font-size: 14px; font-weight: 600; }
.tp-note { font-size: 12px; color: var(--mute); margin: 10px 0 0; }
.tp-note.is-warn { color: #b26f00; }
.tp-cap { font-size: 12px; display: flex; gap: 8px; align-items: center; margin-top: 10px; background: var(--soft); padding: 8px 10px; border-radius: 10px; }
.tp-cap i { font-style: normal; flex: 1; }
.tp-foot { font-size: 12px; margin: 10px 0 0; }
.tp-foot a { color: var(--blue); }
.tp-empty { color: var(--mute); font-size: 13px; margin: 0; }

/* ---- image picker (ip- hooks) ---- */
.ip-drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; background: var(--soft); }
.ip-drop.is-over { border-color: var(--blue); background: #e7edff; }
.ip-prev { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: #fff; display: grid; place-items: center; flex: none; border: 1px solid var(--line); }
.ip-main { min-width: 0; flex: 1; }
.ip-title { font-weight: 600; font-size: 14px; }
.ip-sub { font-size: 12px; color: var(--mute); }
.ip-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ip-btn { height: 30px; font-size: 12px; }
.ip-btn-ghost { background: transparent; border-color: transparent; color: var(--blue); }
.ip-err { color: var(--red); font-size: 12px; }
[data-urlwrap] input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; }

/* ---- 404 ---- */
.ch-404 { text-align: center; padding: 60px 0; }
.ch-404 h1 { font-size: 64px; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ch-card.is-fresh { animation: none; }
  .ch-hero-art .ch-draw { animation: none; stroke-dashoffset: 0; }
  .ch-eyebrow i { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- responsive ---- */
@media (max-width: 980px) {
  .ch-hero { grid-template-columns: 1fr; }
  .ch-hero-art { min-height: 0; max-width: 460px; }
  .ch-two, .ch-two-rev { grid-template-columns: 1fr; }
  .ch-stats { grid-template-columns: repeat(2, 1fr); }
  .ch-sticky { position: static; }
}
@media (max-width: 760px) {
  .ch-nav { display: none; position: absolute; left: 0; right: 0; top: var(--header); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); flex-direction: column; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .ch-nav.is-open { display: flex; }
  .ch-header .ch-burger { display: inline-flex; width: 34px; padding: 0; }
  .ch-hero h1 { font-size: 34px; }
  .ch-hero .ch-lede { font-size: 15px; }
  .ch-hero-art .ch-float { display: none; }
  .ch-main { padding: 20px 16px 48px; }
  .ch-embed { height: 340px; }
  .ch-two-fields { grid-template-columns: 1fr; }
  .ch-tk-head h1 { font-size: 24px; }
  h1 { font-size: 30px; }
  .ch-tile b { font-size: 19px; }
  .ch-tok-price b { font-size: 22px; }
  .ch-stats { grid-template-columns: 1fr 1fr; }
  .ch-tools .ch-btn span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
}

/* ---- width safety: grid children may never widen the page ---- */
.ch-two > *, .ch-two-rev > *, .ch-stack > *, .ch-grid > *, .ch-card { min-width: 0; max-width: 100%; }
.ch-kv div { flex-wrap: wrap; }
.ch-kv dd { min-width: 0; overflow-wrap: anywhere; }
.tp-fact dd { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.ch-article .ch-pager { flex-wrap: wrap; }
.ch-article .ch-pager .ch-btn { white-space: normal; height: auto; min-height: 34px; padding: 8px 12px; text-align: left; line-height: 1.3; }
.ch-tk-addr { min-width: 0; }
.ch-tk-addr code { flex: 1 1 200px; }
@media (max-width: 980px) {
  .ch-two, .ch-two-rev { grid-template-columns: minmax(0, 1fr); }
}
