/* MITI 聚合平台 — bright exchange-style light theme (white / light gray, near-black text, amber accent), mobile-first */
:root {
  --bg: #fafafa;
  --bg2: #f5f5f5;
  --bg3: #eef0f3;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card2: #f5f5f5;
  --line: #eaecef;
  --line2: #dcdfe4;
  --text: #1e2329;
  --text2: #474d57;
  --muted: #5e6673;
  --accent: #f5a623;      /* fills: primary buttons, bars, dots — always dark text on it (7.8:1) */
  --accent-hover: #f7b444;
  --accent-ink: #a35a00;  /* amber for text on white (5.2:1) */
  --accent-soft: #fff6e5;
  --accent-line: #f5c46e;
  /* legacy names kept so page JS / testnet CSS keep working */
  --gold: var(--accent);
  --gold2: var(--accent-ink);
  --gold3: #c27d0e;
  --gold-soft: var(--accent-soft);
  --gold-line: var(--accent-line);
  --warn: #a35a00;
  --bad: #d9304a;
  --ok: #03875a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 21, 26, .04), 0 4px 14px -6px rgba(20, 21, 26, .08);
  --shadow-lg: 0 12px 32px -10px rgba(20, 21, 26, .18);
  --sans: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; background: var(--bg); color-scheme: light; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(245, 166, 35, .35); color: var(--text); }
a { color: var(--accent-ink); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: #7a4300; }
code, .mono { font-family: var(--mono); font-size: .9em; word-break: break-all; color: var(--text2); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .55em; font-weight: 700; letter-spacing: 0; color: var(--text); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: .4em 0 .9em; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(20, 21, 26, .02);
}
.top .in { max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 12px; position: relative; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; letter-spacing: .06em; white-space: nowrap; font-size: 1.02rem; }
.brand img { width: 30px; height: 30px; }
.brand:hover { color: var(--text); }
.brand small { color: var(--muted); font-weight: 500; letter-spacing: .04em; font-size: .78rem; margin-left: 2px; }
.spacer { flex: 1; }

.menuBtn { display: inline-flex; width: 40px; height: 36px; padding: 0 !important; flex-direction: column; gap: 4px; }
.menuBtn i { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menuBtn.x i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menuBtn.x i:nth-child(2) { opacity: 0; }
.menuBtn.x i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile: full-width sheet with grouped sections */
nav.nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: #ffffff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 6px 16px 20px; max-height: calc(100vh - 60px); overflow-y: auto;
}
nav.nav.open { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; animation: drop .2s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
nav.nav .ng { display: contents; }
nav.nav .nh {
  grid-column: 1 / -1; display: block; margin: 14px 2px 4px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; color: var(--muted);
  text-transform: uppercase; background: none; border: 0; padding: 0; font-family: inherit; text-align: left;
}
nav.nav .nh::after { content: none; }
nav.nav .nm { display: contents; }
nav.nav a { color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: .93rem; font-weight: 500; background: var(--bg2); border: 1px solid transparent; }
nav.nav a.on { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); font-weight: 600; }
nav.nav a:hover { color: var(--text); background: var(--bg3); }

@media (min-width: 1000px) {
  .btn.menuBtn { display: none; }
  nav.nav {
    display: flex !important; position: static; background: none; border: 0; box-shadow: none; padding: 0; gap: 2px; max-height: none; overflow: visible;
    animation: none; margin-left: 20px; align-self: stretch; align-items: stretch;
  }
  nav.nav .ng { display: flex; align-items: center; position: relative; }
  nav.nav .nh {
    margin: 0; cursor: pointer; color: var(--text); font-size: .92rem; font-weight: 500; letter-spacing: 0; text-transform: none;
    padding: 8px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; transition: color .15s, background .15s;
  }
  nav.nav .nh::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
  nav.nav .ng.on > .nh { color: var(--accent-ink); font-weight: 600; }
  nav.nav .ng.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
  nav.nav .ng:hover > .nh, nav.nav .ng:focus-within > .nh { color: var(--accent-ink); background: var(--bg2); }
  nav.nav .nm {
    display: none; position: absolute; top: calc(100% - 4px); left: 0; min-width: 200px; padding: 6px;
    background: #ffffff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  }
  nav.nav .ng:hover > .nm, nav.nav .ng:focus-within > .nm { display: flex; flex-direction: column; gap: 2px; animation: drop .15s var(--ease); }
  nav.nav .ng::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; } /* hover bridge */
  nav.nav a { padding: 9px 12px; font-size: .9rem; white-space: nowrap; background: transparent; }
  nav.nav a:hover { background: var(--bg2); color: var(--accent-ink); }
}

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 16px 56px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; background: #ffffff; }
footer .in { max-width: 1200px; margin: 0 auto; padding: 28px 16px 36px; }
footer .risk { color: var(--text); font-weight: 600; }
footer p { margin: .3em 0 .8em; max-width: 780px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  appearance: none; -webkit-appearance: none; border: 1px solid var(--line2); background: #ffffff; color: var(--text);
  border-radius: 8px; padding: 0 18px; min-height: 44px; font: inherit; font-size: .93rem; font-weight: 600;
  cursor: pointer; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:hover { border-color: #c5c9d0; background: var(--bg2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: #1e2329; border-color: var(--accent); box-shadow: 0 2px 8px -3px rgba(245, 166, 35, .55); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #1e2329; }
.btn.violet { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.btn.violet:hover { background: #ffecc7; color: #7a4300; }
.btn.ghost { background: transparent; border-color: var(--line2); }
.btn.ghost:hover { background: var(--bg2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 6px; }
.btn.danger { border-color: rgba(217, 48, 74, .4); color: var(--bad); background: #ffffff; }
.btn.danger:hover { background: #fdecef; color: #b0213a; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.center { justify-content: center; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid > * { min-width: 0; }
@media (min-width: 680px) { .grid { gap: 16px; } .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.c3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------- cards */
.card {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0;
}
@media (min-width: 680px) { .card { padding: 24px; } }
.card.hl { border-color: var(--accent-line); background: linear-gradient(180deg, #fffaf0 0%, #ffffff 120px); }
.card.hl::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: var(--accent); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; line-height: 1.6; }
.tag {
  display: inline-flex; align-items: center; font-size: .74rem; font-weight: 500; padding: 2px 8px; border-radius: 4px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text2); white-space: nowrap; line-height: 1.5;
}
.tag.ok { color: var(--ok); background: #e7f6ef; border-color: #bfe5d3; }
.tag.bad { color: var(--bad); background: #fdecef; border-color: #f6c5cd; }
.tag.warn { color: var(--warn); background: var(--accent-soft); border-color: var(--accent-line); }
.tag.vip { color: #1e2329; background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* ---------------------------------------------------------------- forms */
input[type=text], input[type=number], textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-sm);
  padding: 11px 14px; min-height: 44px; font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
@media (min-width: 680px) { input[type=text], input[type=number], textarea, select { font-size: .93rem; } }
input::placeholder, textarea::placeholder { color: #8a919e; }
textarea { font-family: var(--mono); font-size: .86rem; min-height: 150px; resize: vertical; line-height: 1.6; }
input:hover, textarea:hover, select:hover { border-color: var(--line2); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 166, 35, .18); background: #ffffff; }
select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
label.chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.field { margin: 14px 0; }
.field > span { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.msg { min-height: 1.2em; font-size: .88rem; color: var(--muted); margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.warn { color: var(--warn); }
.msg.bad, .msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--muted); flex-shrink: 0; max-width: 42%; }
.kv > b { text-align: right; font-weight: 600; word-break: break-word; overflow-wrap: anywhere; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .kv { flex-direction: column; gap: 2px; }
  .kv > span { max-width: none; font-size: .8rem; }
  .kv > b { text-align: left; }
}
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* ---------------------------------------------------------------- hero / sections */
.hero { padding: 4px 0 0; margin-top: 0; }
@media (min-width: 680px) { .hero { padding: 16px 0 4px; margin-top: 0; } }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 3px 10px; border-radius: 4px; margin-bottom: 16px; }
.hero .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: 1.9rem; line-height: 1.28; font-weight: 800; margin-bottom: .55em; }
@media (min-width: 680px) { .hero h1 { font-size: 2.8rem; } }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .lead { color: var(--text2); font-size: 1rem; max-width: 660px; line-height: 1.8; margin-bottom: 24px; }
.hero .row .btn { min-width: 132px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 28px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 680px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats > div { background: #ffffff; padding: 14px 16px 12px; min-width: 0; }
.stats b { display: block; font-size: 1.02rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 680px) { .stats b { font-size: 1.2rem; } }
.stats span { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }

section { margin: 32px 0; }
@media (min-width: 680px) { section { margin: 52px 0; } }
section > h2 { font-size: 1.28rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
section > h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); }

.feat { display: block; color: var(--text); transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.feat:hover { color: var(--text); border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feat .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
  color: #1e2329; background: var(--accent); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.feat h3 { margin-bottom: .35em; }
.feat p { margin-bottom: 0; color: var(--text2); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 44px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #1e2329; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 1px; background: var(--line2); }

/* ---------------------------------------------------------------- wallet modal */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(20, 21, 26, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal .box { width: 100%; max-width: 440px; background: #ffffff; border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; box-shadow: 0 -12px 40px -12px rgba(20, 21, 26, .25); }
@media (min-width: 680px) { .modal { align-items: center; } .modal .box { border-radius: 16px; padding: 26px; } }
.wlist { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.wlist .btn { justify-content: flex-start; width: 100%; min-height: 52px; padding: 0 14px; background: var(--bg2); border-color: var(--line); }
.wlist .btn:hover { border-color: var(--accent); background: #ffffff; }
.wlist img { width: 26px; height: 26px; border-radius: 7px; }

/* ---------------------------------------------------------------- lock */
.lock { text-align: center; padding: 40px 20px; }
.lock .big { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); }
.lock .big svg { width: 24px; height: 24px; }
.lock .big.spin svg { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lock h2 { font-size: 1.15rem; }
.lock p { max-width: 460px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- tables */
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; background: #ffffff; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafafa; }
th { color: var(--muted); font-weight: 500; background: var(--bg2); white-space: nowrap; font-size: .78rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.hit td { background: var(--accent-soft); }
tr.done td { opacity: .5; }
td small, .sub { display: block; color: var(--muted); font-size: .76rem; }

/* progress */
.bar { position: relative; height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; min-width: 90px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .9s var(--ease); }
td .bar { margin: 6px 0 0; }
.thr { width: 72px !important; padding: 6px 8px !important; min-height: 34px !important; }

/* ---------------------------------------------------------------- misc */
.hex { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--mono); font-size: .8rem; word-break: break-all; color: var(--text); }
.flags { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .flags { grid-template-columns: 1fr 1fr; } }
.flag { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.flag .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; background: var(--muted); }
.flag.ok { border-left: 3px solid var(--ok); } .flag.ok .d { background: var(--ok); }
.flag.bad { border-left: 3px solid var(--bad); } .flag.bad .d { background: var(--bad); }
.flag.warn { border-left: 3px solid var(--accent); } .flag.warn .d { background: var(--accent); }
.flag b { display: block; font-weight: 600; }
.flag span { color: var(--muted); font-size: .84rem; }
.plans .price { font-size: 1.9rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.plans .price small { font-size: .86rem; color: var(--muted); font-weight: 500; margin-left: 4px; }
.notice { border: 1px solid var(--accent-line); border-left: 3px solid var(--accent); background: var(--accent-soft); color: #5c3500; border-radius: var(--radius-sm); padding: 10px 14px; font-size: .86rem; margin-bottom: 14px; }
.pending { border: 1px dashed var(--accent-line); color: var(--accent-ink); border-radius: var(--radius-sm); padding: 12px 16px; text-align: center; font-size: .88rem; font-weight: 500; background: var(--accent-soft); }
.log { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.log .tm { color: var(--muted); font-family: var(--mono); margin-right: 8px; }
.toolhead { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolhead h1 { margin: 0; font-size: 1.42rem; }
.toolhead h2 { margin: 0; }
.dlist { margin: 0; padding-left: 1.2em; }
.dlist li { margin: 4px 0; }
.offscreen { position: fixed; left: -9999px; top: 0; }
.right { text-align: right; }
.mt { margin-top: 16px; }
textarea.short { min-height: 70px; }
ul, ol { padding-left: 1.25em; }
li { margin: 3px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ================================================================ exchange layout pass
   dense trading-platform look: 14px base, 4–8px radii, flat bordered cards, bold numerals, underline tabs */
:root { --radius: 8px; --radius-sm: 4px; --shadow: 0 0 0 rgba(0,0,0,0); --shadow-lg: 0 8px 24px rgba(20, 21, 26, .12); }
body { font-size: 14px; line-height: 1.6; letter-spacing: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }

.top .in { height: 64px; max-width: 1248px; padding: 0 16px; gap: 8px; }
.top { box-shadow: none; }
.brand { font-size: 1.12rem; letter-spacing: .02em; font-weight: 800; }
.brand img { width: 28px; height: 28px; }
@media (min-width: 1000px) {
  nav.nav { margin-left: 28px; gap: 0; }
  nav.nav .nh { font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 4px; }
  nav.nav .ng.on::after { left: 12px; right: 12px; height: 2px; border-radius: 0; }
  nav.nav .ng:hover > .nh, nav.nav .ng:focus-within > .nh { background: transparent; }
  nav.nav .nm { border-radius: 8px; padding: 8px; min-width: 220px; top: calc(100% - 6px); }
  nav.nav a { font-size: 14px; padding: 10px 12px; border-radius: 4px; font-weight: 500; color: var(--text); }
}
nav.nav a { border-radius: 4px; font-size: 14px; }

main { max-width: 1248px; padding: 16px 16px 48px; }
@media (min-width: 680px) { main { padding: 24px 24px 64px; } }
footer { font-size: 12px; background: #fafafa; }
footer .in { max-width: 1248px; }

/* buttons: rectangular 4px, 40px tall, bold */
.btn { border-radius: 4px; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; letter-spacing: 0; background: #eaecef; border-color: #eaecef; }
.btn:hover { background: #dcdfe4; border-color: #dcdfe4; }
.btn.primary { box-shadow: none; border-radius: 4px; }
.btn.ghost { background: #ffffff; border-color: var(--line2); }
.btn.ghost:hover { background: #f5f5f5; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 4px; }
.btn.violet { border-radius: 4px; }
.btn.danger { border-radius: 4px; background: #ffffff; }
#connectBtn { min-height: 32px; padding: 0 14px; }
@media (max-width: 999px) { .btn.menuBtn { background: transparent; border-color: transparent; width: 36px; } }
.wlist .btn { border-radius: 8px; }

/* cards: flat white panels, 1px border, tight padding */
.grid { gap: 12px; }
@media (min-width: 680px) { .grid { gap: 16px; } }
.card { border-radius: 8px; padding: 16px; box-shadow: none; }
@media (min-width: 680px) { .card { padding: 20px 24px; } }
.card.hl { background: #ffffff; border-color: var(--line); }
.card.hl::before { left: -1px; right: -1px; height: 2px; border-radius: 8px 8px 0 0; }
.feat:hover { transform: none; box-shadow: var(--shadow-lg); border-color: var(--line2); }
.feat .ic { width: 36px; height: 36px; border-radius: 6px; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.feat:hover .ic { background: var(--accent); color: #1e2329; border-color: var(--accent); }
.feat h3 { font-size: 15px; }
.feat p { font-size: 13px; line-height: 1.6; color: var(--muted); }

/* tags / badges: small square chips */
.tag { border-radius: 2px; font-size: 12px; padding: 1px 6px; }

/* forms: filled gray inputs, no heavy border */
input[type=text], input[type=number], textarea, select { border-radius: 4px; background: #f5f5f5; border-color: #f5f5f5; min-height: 40px; }
input:hover, textarea:hover, select:hover { border-color: var(--accent); }
.field { margin: 12px 0; }
.field > span { font-size: 12px; }
.kv { padding: 9px 0; font-size: 14px; }
.kv > span { font-size: 13px; }
.kv > b { font-size: 14px; }

/* hero: big bold headline + ticker strip */
.hero { padding: 8px 0 0; }
@media (min-width: 680px) { .hero { padding: 8px 0 4px; } }
.hero .eyebrow { border-radius: 2px; font-size: 12px; letter-spacing: .08em; padding: 2px 8px; margin-bottom: 14px; }
.hero h1 { font-size: 2rem; font-weight: 800; line-height: 1.22; }
@media (min-width: 680px) { .hero h1 { font-size: 3rem; } }
.hero .lead { font-size: 15px; color: var(--muted); }
.hero .row .btn { min-height: 48px; min-width: 140px; font-size: 15px; }
.stats { border-radius: 8px; box-shadow: none; margin-top: 24px; }
.stats > div { padding: 14px 16px; }
.stats b { font-size: 18px; font-weight: 700; }
@media (min-width: 680px) { .stats b { font-size: 22px; } }
.stats span { font-size: 12px; }

/* section headings: plain bold, no bar */
section { margin: 28px 0; }
@media (min-width: 680px) { section { margin: 48px 0; } }
section > h2 { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
section > h2::before { content: none; }
@media (min-width: 680px) { section > h2 { font-size: 24px; } }

/* page title strip on tool pages */
.toolhead { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.toolhead h1 { font-size: 22px; font-weight: 700; }
@media (min-width: 680px) { .toolhead h1 { font-size: 26px; } }

/* tables: market-list style */
.tableWrap { border-radius: 8px; }
table { font-size: 13px; }
th { background: #ffffff; color: var(--muted); font-size: 12px; font-weight: 400; padding: 10px 12px; }
td { padding: 12px; }
tbody tr:hover td { background: #f5f5f5; }

/* tabs (underline style) for any segmented control */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs > * { padding: 10px 0; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font: inherit; white-space: nowrap; }
.tabs > .on, .tabs > [aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }

/* progress, notices */
.bar { height: 4px; border-radius: 2px; background: #eaecef; }
.bar > i { border-radius: 2px; }
.notice, .pending, .hex, .flag { border-radius: 4px; }
.plans .price { font-size: 28px; }
.modal .box { border-radius: 12px 12px 0 0; }
@media (min-width: 680px) { .modal .box { border-radius: 12px; } }
.lock .big { background: #f5f5f5; border-color: var(--line); }

/* 主网构建：扫码连接 + 指令参与 */
.modal .qrbox { text-align: center; margin: 12px 0; }
.modal .qrbox .qr { display: inline-block; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 12px; line-height: 0; }
.modal .qrbox .qr svg { width: 232px; height: 232px; }
.modal pre.cmdout { white-space: pre-wrap; word-break: break-all; font-size: .78rem; max-height: 260px; overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.modal .field input { width: 100%; }
