/* Arcdesk — shared stylesheet. Dark-first trading desk look: ink ground, mono data,
   teal action + amber urgency. */
:root {
  --ground: #0d1117;
  --surface: #161b22;
  --elevated: #1b222c;
  --line: #262d38;
  --line-strong: #333c49;
  --ink: #e8ecf2;
  --muted: #98a2b3;
  --faint: #6b7482;
  --teal: #35d0ba;
  --teal-soft: #12312e;
  --amber: #f5a524;
  --amber-soft: #35290f;
  --good: #3fb950;
  --crit: #f85149;
  --crit-soft: #3a1a18;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}
/* explicit user choice (theme button) beats the OS setting */
:root[data-theme="light"] {
  --ground: #f4f6f8; --surface: #fff; --elevated: #fff;
  --line: #e2e6eb; --line-strong: #cfd5dd;
  --ink: #10151b; --muted: #5c6675; --faint: #8a93a2;
  --teal: #0e9f8e; --teal-soft: #d7f3ee;
  --amber: #c67c05; --amber-soft: #fbecd2;
  --good: #1a8a45; --crit: #cf3a2f; --crit-soft: #fbe3e0;
  --shadow: 0 1px 2px rgba(16,21,27,.06), 0 8px 24px rgba(16,21,27,.06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ground: #0d1117; --surface: #161b22; --elevated: #1b222c;
  --line: #262d38; --line-strong: #333c49;
  --ink: #e8ecf2; --muted: #98a2b3; --faint: #6b7482;
  --teal: #35d0ba; --teal-soft: #12312e;
  --amber: #f5a524; --amber-soft: #35290f;
  --good: #3fb950; --crit: #f85149; --crit-soft: #3a1a18;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f4f6f8; --surface: #fff; --elevated: #fff;
    --line: #e2e6eb; --line-strong: #cfd5dd;
    --ink: #10151b; --muted: #5c6675; --faint: #8a93a2;
    --teal: #0e9f8e; --teal-soft: #d7f3ee;
    --amber: #c67c05; --amber-soft: #fbecd2;
    --good: #1a8a45; --crit: #cf3a2f; --crit-soft: #fbe3e0;
    --shadow: 0 1px 2px rgba(16,21,27,.06), 0 8px 24px rgba(16,21,27,.06);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  /* short pages still push the footer to the bottom instead of leaving it mid-screen */
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
.sitefoot { flex: none; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0 0 8px; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* nav */
header {
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px);
}
.bar { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
/* one mark everywhere: the header, the footer and favicon.svg draw the same paths */
.spark { width: 25px; height: 25px; border-radius: 7px; display: block; flex: none; }
nav.menu { display: flex; gap: 2px; }
nav.menu a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px;
}
nav.menu a:hover { color: var(--ink); text-decoration: none; }
nav.menu a.here { color: var(--teal); background: var(--teal-soft); }
.grow { flex: 1; }
.connect {
  height: 36px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent;
  background: var(--teal); color: #04211d; font-weight: 700; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 7px;
}
.connect.on { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

main { padding: 28px 0 70px; }
.pagehead { margin-bottom: 20px; }
.pagehead h1 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; }
.pagehead p { color: var(--muted); max-width: 62ch; }

/* cards / panels */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* offer rows */
.offer {
  position: relative; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-bottom: 10px;
  display: grid; grid-template-columns: 1.2fr .8fr 1fr auto; gap: 12px 18px; align-items: center;
  box-shadow: var(--shadow);
}
.offer.open { border-left: 3px solid color-mix(in srgb, var(--teal) 55%, var(--line)); }
@media (max-width: 700px) { .offer { grid-template-columns: 1fr 1fr; } .offer .buycell { grid-column: 1/-1; } }
.cell label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; color: var(--faint); margin-bottom: 3px; }
.amt { font-size: 19px; font-weight: 600; }
.amt small { font-size: 12px; color: var(--muted); font-weight: 500; }
.maker { color: var(--faint); font-size: 12px; }
.prem { font-size: 16px; font-weight: 600; }
.prem.low { color: var(--good); } .prem.mid { color: var(--amber); } .prem.high { color: var(--crit); }
.openflag { color: var(--teal); font-weight: 600; font-size: 12.5px; }
.buy {
  height: 38px; padding: 0 18px; border-radius: 10px; border: 0;
  background: var(--teal); color: #04211d; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.buycell { display: flex; justify-content: flex-end; }

/* forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--ground); color: var(--ink);
  font-family: "IBM Plex Mono", monospace; font-size: 14px;
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 28%, transparent); }
.cta {
  width: 100%; height: 46px; border-radius: 11px; border: 0;
  background: var(--teal); color: #04211d; font-weight: 700; font-size: 15px;
}
.cta:disabled { opacity: .5; cursor: default; }
.ghost {
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: none; color: var(--muted); font-weight: 600; font-size: 13px;
}

/* badges + status */
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.done { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.refund { background: var(--crit-soft); color: var(--crit); }
.badge.neutral { background: var(--line); color: var(--muted); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; }
.steps .k {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none;
  display: grid; place-items: center; font-size: 12px; color: var(--faint); background: var(--surface);
}
.steps li.active .k { border-color: var(--teal); color: var(--teal); }
.steps li.done .k { border-color: var(--good); background: var(--good); color: #04211d; }
.steps .tx b { display: block; font-weight: 600; }
.steps .tx span { color: var(--muted); font-size: 12px; }

.note { font-size: 13px; color: var(--muted); background: var(--ground); border-radius: 10px; padding: 11px 13px; }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.note.err { background: var(--crit-soft); color: var(--crit); }
.statrow { display: flex; gap: 26px; flex-wrap: wrap; margin: 6px 0 18px; }
.statrow .s b { display: block; font-size: 20px; }
.statrow .s span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--line); }
.tblwrap { overflow-x: auto; }

footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; padding: 18px 0 40px; }
footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; }
.flag { background: var(--amber-soft); color: var(--amber); font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 11px; }

.themebtn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); display: grid; place-items: center; font-size: 15px;
}
.themebtn:hover { border-color: var(--teal); }

/* docs page */
.doc h2 { font-size: 17px; margin-top: 26px; }
.doc pre {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; overflow-x: auto; font-size: 13px; line-height: 1.55;
  font-family: "IBM Plex Mono", monospace;
}
.doc code { font-family: "IBM Plex Mono", monospace; font-size: .92em; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.doc pre code { border: 0; padding: 0; background: none; }


/* ---- exchange layout ---- */
.strip{
  display:flex;gap:0;flex-wrap:wrap;align-items:stretch;
  background:var(--surface);border:1px solid var(--line);border-radius:13px;
  overflow:hidden;margin-bottom:16px;box-shadow:var(--shadow)
}
.strip .cell{padding:11px 18px;border-right:1px solid var(--line);min-width:132px}
.strip .cell:last-child{border-right:0}
.strip .cell span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.11em;color:var(--faint);margin-bottom:3px}
.strip .cell b{font-size:16px;font-weight:600}
.strip .pair{background:var(--ground);display:flex;align-items:center;gap:9px;font-weight:700;font-size:15px}
.strip .pair .dot{width:7px;height:7px;border-radius:50%;background:var(--good)}
.strip .ask b{color:var(--crit)} .strip .bid b{color:var(--good)}

.exchange{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);gap:16px;align-items:start}
@media(max-width:900px){.exchange{grid-template-columns:1fr}}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.panel > .ph{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 16px;border-bottom:1px solid var(--line)}
.panel > .ph b{font-size:14px}
.panel > .ph span{font-size:11.5px;color:var(--faint)}

.bookcols{display:grid;grid-template-columns:1fr 1fr}
@media(max-width:560px){.bookcols{grid-template-columns:1fr}}
.bookcol{min-width:0}
.bookcol + .bookcol{border-left:1px solid var(--line)}
@media(max-width:560px){.bookcol + .bookcol{border-left:0;border-top:1px solid var(--line)}}
.colhead{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:9px 14px;
  font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:var(--faint);
  border-bottom:1px solid var(--line)}
.colhead .r{text-align:right}
.lvl{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center;position:relative;
  padding:8px 14px;font-size:13.5px;cursor:pointer;border-bottom:1px solid var(--line)}
.lvl:last-child{border-bottom:0}
.lvl:hover{background:var(--ground)}
.lvl .depth{position:absolute;top:0;bottom:0;right:0;opacity:.13;pointer-events:none}
.asks .lvl .depth{background:var(--crit)} .bids .lvl .depth{background:var(--good)}
.lvl .p{position:relative;font-weight:600;font-variant-numeric:tabular-nums}
.asks .lvl .p{color:var(--crit)} .bids .lvl .p{color:var(--good)}
.lvl .s{position:relative;text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.lvl.sel{background:var(--teal-soft)}
.emptybook{padding:26px 16px;text-align:center;color:var(--faint);font-size:13px}
.emptybook b{display:block;color:var(--muted);margin-bottom:4px;font-size:13.5px}

.ticket{padding:16px}
.tside{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:14px}
.tside button{height:38px;border-radius:9px;border:1px solid var(--line-strong);background:none;
  color:var(--muted);font-weight:700;font-size:13.5px}
.tside button[aria-pressed="true"][data-side="ask"]{background:color-mix(in srgb,var(--good) 16%,transparent);
  border-color:var(--good);color:var(--good)}
.tside button[aria-pressed="true"][data-side="bid"]{background:var(--crit-soft);border-color:var(--crit);color:var(--crit)}
.tline{display:flex;justify-content:space-between;font-size:13px;padding:5px 0;color:var(--muted)}
.tline b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.tline.big b{font-size:16px}
.tsep{height:1px;background:var(--line);margin:10px 0}
.trust2{display:flex;gap:20px;flex-wrap:wrap;margin-top:18px;padding:14px 16px;
  border:1px dashed var(--line-strong);border-radius:12px}
.trust2 div{display:flex;gap:8px;font-size:12.5px;color:var(--muted);align-items:flex-start;flex:1;min-width:210px}
.trust2 b{color:var(--ink);font-weight:600}
.trust2 .ic{color:var(--teal);font-weight:700}

/* ---- site footer ---- */
.sitefoot{border-top:1px solid var(--line);margin-top:46px;padding:26px 0 40px}
.sitefoot .inner{display:flex;gap:26px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.sitefoot .brandcol{display:flex;gap:11px;align-items:flex-start}
.sitefoot .spark{width:26px;height:26px;border-radius:7px;flex:none}
.sitefoot .bname{font-weight:800;font-size:14px;letter-spacing:.06em;text-transform:uppercase}
.sitefoot .btag{font-size:12.5px;color:var(--faint);margin-top:2px}
.sitefoot nav{display:flex;gap:22px;flex-wrap:wrap}
.sitefoot nav a{color:var(--muted);font-size:13.5px}
.sitefoot nav a:hover{color:var(--ink);text-decoration:none}
.sitefoot .fine{margin-top:20px;padding-top:16px;border-top:1px solid var(--line);
  display:flex;gap:14px;justify-content:space-between;flex-wrap:wrap;font-size:12px;color:var(--faint)}
.sitefoot .fine a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.sitefoot .fine a:hover{color:var(--ink)}

/* ---- long-form policy pages ---- */
.prose{max-width:74ch}
.prose h2{font-size:17px;margin-top:28px}
.prose h3{font-size:14.5px;margin-top:20px}
.prose p,.prose li{color:var(--muted);font-size:14px}
.prose li{margin-bottom:6px}
.prose strong{color:var(--ink)}
.prose .updated{font-size:12.5px;color:var(--faint);margin-bottom:22px}

/* ---- empty states ---- */
.emptystate{background:var(--surface);border:1px solid var(--line);border-radius:14px;
  padding:34px 22px;text-align:center;box-shadow:var(--shadow)}
.emptystate .mark{width:44px;height:44px;border-radius:12px;background:var(--ground);
  border:1px solid var(--line-strong);display:grid;place-items:center;margin:0 auto 12px;
  font-size:19px;color:var(--faint)}
.emptystate b{display:block;font-size:15px;margin-bottom:5px}
.emptystate p{color:var(--muted);font-size:13.5px;max-width:46ch;margin:0 auto 14px}
.emptystate .cta2{display:inline-flex;height:40px;align-items:center;padding:0 18px;border-radius:10px;
  background:var(--teal);color:#04211d;font-weight:700;font-size:14px}
.emptystate .cta2:hover{text-decoration:none;filter:brightness(1.06)}
