/* ============================================================
   SLIP desk app - same design system as the landing page
   (pill nav, rounded panels, amber action, steel secondary).
   ============================================================ */
:root {
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: var(--font);
  --r: 10px; --r-card: 16px; --r-panel: 28px; --row: 44px;
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-out: var(--ease); --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
:root[data-theme="dark"], :root:not([data-theme]) {
  color-scheme: dark;
  --bg: #0B0C12; --panel: #121420; --ink: #F3F2F7; --ink-2: rgba(243,242,247,.66); --ink-3: rgba(243,242,247,.42); --ink-4: rgba(243,242,247,.26);
  --line: rgba(255,255,255,.08); --line-soft: rgba(255,255,255,.05); --line2: rgba(255,255,255,.13); --well: rgba(0,0,0,.22); --well2: rgba(0,0,0,.32); --well3: rgba(255,255,255,.04);
  --bar: rgba(26,27,37,.92); --barline: rgba(255,255,255,.1); --barshadow: 0 10px 40px rgba(0,0,0,.35);
  --accent: #F5B231; --accent-2: #FFC857; --accent-ink: #171000; --accent-wash: rgba(245,178,49,.10); --accent-dk: rgba(245,178,49,.45);
  --sec: #8FB3E8; --sec-2: #B9CFF3; --sec-ink: #08111F; --sec-wash: rgba(143,179,232,.12);
  --disc: #3DD68C; --disc-wash: rgba(61,214,140,.12); --prem: #FF6E7A; --prem-wash: rgba(255,110,122,.12); --warn: #F5B231; --warn-wash: rgba(245,178,49,.10);
  --scrim: rgba(5,6,10,.6); --field: rgba(0,0,0,.28);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ECECF1; --panel: #F6F6F9; --ink: #14131A; --ink-2: rgba(20,19,26,.68); --ink-3: rgba(20,19,26,.48); --ink-4: rgba(20,19,26,.34);
  --line: rgba(0,0,0,.08); --line-soft: rgba(0,0,0,.05); --line2: rgba(0,0,0,.13); --well: rgba(0,0,0,.04); --well2: rgba(0,0,0,.07); --well3: rgba(0,0,0,.035);
  --bar: rgba(255,255,255,.92); --barline: rgba(0,0,0,.08); --barshadow: 0 10px 40px rgba(20,16,40,.08);
  --accent: #E39A11; --accent-2: #F5B231; --accent-ink: #171000; --accent-wash: rgba(227,154,17,.12); --accent-dk: rgba(227,154,17,.55);
  --sec: #2F5FB3; --sec-2: #4A79CC; --sec-ink: #fff; --sec-wash: rgba(47,95,179,.10);
  --disc: #1B8F55; --disc-wash: rgba(27,143,85,.12); --prem: #C93A45; --prem-wash: rgba(201,58,69,.12); --warn: #B8760A; --warn-wash: rgba(184,118,10,.12);
  --scrim: rgba(20,19,26,.4); --field: #fff;
}

::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--line2); border: 2px solid var(--bg); border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* ============================================================
   Pill header (shared look with the landing)
   ============================================================ */
.top { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 20px 32px 0; }
.pillbar { position: relative; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--barline); background: var(--bar); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--barshadow); }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 600; font-size: 18px; letter-spacing: .12em; color: var(--ink); text-decoration: none; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); position: relative; flex: none; }
.mark::after { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px; background: var(--accent-ink); border-radius: 2px; transform: rotate(-30deg); }
.nav { flex: 1; display: flex; justify-content: center; gap: 2px; }
.nav button { font: 500 13px/1 var(--font); color: var(--ink-2); background: none; border: 0; padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s; display: inline-flex; align-items: center; gap: 8px; }
.nav button:hover { color: var(--ink); background: var(--well3); }
.nav button[aria-selected="true"] { color: var(--ink); background: var(--well2); font-weight: 600; }
.nav button .badge { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); background: var(--well3); padding: 2px 7px; border-radius: 999px; }
.nav button[aria-selected="true"] .badge { color: var(--accent-ink); background: var(--accent); }
.ctl { display: flex; align-items: center; gap: 2px; height: 46px; padding: 2px; border-radius: 999px; border: 1px solid var(--barline); background: var(--well); }
.chain-chip { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.chain-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--disc); position: relative; flex: none; }
.chain-chip i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--disc); opacity: .6; animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
.vsep { width: 1px; height: 16px; background: var(--line2); margin: 0 2px; }
.theme { display: flex; height: 100%; } .theme button { min-width: 42px; height: 100%; display: grid; place-items: center; border-radius: 999px; color: var(--ink-3); background: none; border: 0; cursor: pointer; transition: color .2s, background .2s; }
.theme button:hover { color: var(--ink); } .theme button.on { color: var(--ink); background: var(--well2); }
.addr-chip { display: inline-flex; align-items: center; height: 100%; padding: 0 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* ============================================================
   Layout: two rounded panels, like the landing sections
   ============================================================ */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; padding: 104px 32px 40px; }
.panel { position: relative; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.main { min-width: 0; min-height: calc(100vh - 144px); }
.view[hidden] { display: none; }

/* ============================================================
   Filter strip
   ============================================================ */
.strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.strip-label { font-size: 12px; color: var(--ink-3); }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { font: 500 12px/1 var(--font); color: var(--ink-2); background: transparent; border: 1px solid transparent; padding: 7px 11px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.pill:hover { color: var(--ink); background: var(--well3); }
.pill[aria-pressed="true"] { color: var(--ink); background: var(--well2); border-color: var(--line2); font-weight: 600; }
.strip .spacer { flex: 1 1 auto; }
.seg { display: flex; padding: 3px; border: 1px solid var(--line2); border-radius: 999px; gap: 2px; }
.seg button { font: 500 12px/1 var(--font); color: var(--ink-2); background: none; border: 0; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
.count { font: 400 12px/1 var(--mono); color: var(--ink-3); }

/* ============================================================
   Book table
   ============================================================ */
#book-wrap, #mine-wrap { overflow-x: auto; }
/* The Fill button is the whole point of a row, so it must never be the thing
   that scrolls off. Pin it to the right edge as the table overflows.
   The background MUST be fully opaque: --well and friends are translucent
   blacks, so scrolling cells showed straight through the pinned column. */
.book { width: 100%; border-collapse: collapse; }
.book td.act, .book thead th.act {
  position: sticky; right: 0; z-index: 2;
  background: var(--panel);
  padding-left: 10px; padding-right: 18px;
}
.book td.act::before, .book thead th.act::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 14px;
  transform: translateX(-100%); pointer-events: none;
  background: linear-gradient(to right, transparent, var(--panel));
}
/* Row hover/selection must repaint the pinned cell too, or it reads as a
   detached strip floating over the row. */
.book tbody tr:hover td.act { background: color-mix(in srgb, var(--panel) 88%, var(--ink)); }
.book tbody tr:hover td.act::before { background: linear-gradient(to right, transparent, color-mix(in srgb, var(--panel) 88%, var(--ink))); }
.book tbody tr[aria-selected="true"] td.act { background: color-mix(in srgb, var(--panel) 80%, var(--accent)); }
.book tbody tr[aria-selected="true"] td.act::before { background: linear-gradient(to right, transparent, color-mix(in srgb, var(--panel) 80%, var(--accent))); }
.book thead th { font: 500 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: right; white-space: nowrap; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); background: var(--well3); }
.book thead th:first-child, .book thead th.l { text-align: left; padding-left: 22px; }
.book tbody tr { height: var(--row); border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .15s; }
.book tbody tr:hover { background: var(--well3); }
.book tbody tr[aria-selected="true"] { background: var(--accent-wash); }
.book tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.book td { padding: 0 14px; text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.book td.l { text-align: left; padding-left: 22px; }
.pair { display: flex; align-items: center; gap: 8px; }
.pair-syms { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--ink); }
.pair-syms .arrow { color: var(--accent); margin: 0 4px; font-weight: 400; }
.ca { font-size: 10.5px; color: var(--ink-4); }
.book td .stack { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; } .book td .stack > span:first-child { color: var(--ink); }
.book td .sub { font-size: 10.5px; color: var(--ink-4); }
.edge { font-weight: 600; font-size: 12.5px; padding: 3px 8px; border-radius: 999px; display: inline-block; min-width: 66px; text-align: center; }
.edge.d { color: var(--disc); background: var(--disc-wash); } .edge.p { color: var(--prem); background: var(--prem-wash); } .edge.f { color: var(--ink-2); background: var(--well2); }
.vis { font-family: var(--font); font-size: 10.5px; letter-spacing: .06em; font-weight: 600; color: var(--ink-3); } .vis.priv { color: var(--sec-2); }
.exp-soon { color: var(--prem); }
.flag { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 4px; flex: none; color: var(--prem); border: 1px solid var(--prem); font: 700 10px/1 var(--font); }
.btn-fill { font: 600 12px/1 var(--font); color: var(--sec-2); background: none; border: 1px solid transparent; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s var(--ease); }
.book tbody tr:hover .btn-fill { background: var(--accent); color: var(--accent-ink); }
.btn-fill:active { transform: scale(.97); }

/* ============================================================
   Rail: stats + tape
   ============================================================ */
.rail { position: sticky; top: 104px; }
.rail-stats { padding: 18px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.rail-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rail-stats span { font-size: 12px; color: var(--ink-3); }
.rail-stats b { font: 600 13px/1 var(--mono); color: var(--ink); }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rail-head .live { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.rail-head .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--disc); }
@media (prefers-reduced-motion: no-preference) { .rail-head .live i { animation: pulse 2.4s var(--ease-in-out) infinite; } }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }
.tape { list-style: none; margin: 0; padding: 0; }
.tape li { padding: 10px 20px; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-family: var(--mono); font-size: 12px; }
.tape li.new { animation: tape-in .3s var(--ease); } @media (prefers-reduced-motion: reduce) { .tape li.new { animation: none; } }
@keyframes tape-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tape .t-pair { font-family: var(--font); font-weight: 600; color: var(--ink); font-size: 12.5px; }
.tape .t-edge { font-weight: 600; text-align: right; } .tape .t-edge.d { color: var(--disc); } .tape .t-edge.p { color: var(--prem); }
.tape .t-sz { color: var(--ink-3); font-size: 11px; } .tape .t-ago { color: var(--ink-4); font-size: 11px; text-align: right; }

/* ============================================================
   Empty state
   ============================================================ */
.empty { padding: 72px 32px; max-width: 480px; margin: 0 auto; text-align: center; }
.empty-mark { width: 100%; max-width: 200px; height: 56px; margin: 0 auto 22px; display: block; opacity: .7; }
.empty h2 { font: 600 18px/1.3 var(--font); margin: 0 0 8px; letter-spacing: -.01em; }
.empty p { color: var(--ink-2); margin: 0 auto 20px; max-width: 44ch; line-height: 1.65; }
.empty .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Buttons
   ============================================================ */
.btn { font: 600 13px/1 var(--font); padding: 11px 18px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line2); background: transparent; color: var(--ink); transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--prem); border-color: rgba(255,110,122,.35); } .btn.danger:hover { background: var(--prem-wash); border-color: var(--prem); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.sm { padding: 7px 12px; font-size: 12px; }
.btn.block { width: 100%; padding: 14px; font-size: 14px; }

/* ============================================================
   Create order
   ============================================================ */
.view-head { padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.view-head h1 { font: 600 22px/1.2 var(--font); margin: 0 0 4px; letter-spacing: -.02em; }
.view-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.create { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0; align-items: start; }
.create-form { padding: 22px 24px 40px; border-right: 1px solid var(--line); }
.create-out { padding: 22px 26px 40px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font: 600 12px/1 var(--font); color: var(--ink); margin-bottom: 8px; }
.io { display: grid; grid-template-columns: 1fr 132px; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--field); transition: border-color .15s, box-shadow .15s; }
.io:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.io input { font: 500 16px/1 var(--mono); font-variant-numeric: tabular-nums; background: none; border: 0; color: var(--ink); padding: 13px 14px; min-width: 0; } .io input:focus { outline: none; } .io input::placeholder { color: var(--ink-4); }
.io select { font: 600 12.5px/1 var(--mono); color: var(--ink); background: var(--well3); border: 0; border-left: 1px solid var(--line2); padding: 0 12px; cursor: pointer; } .io select:focus { outline: none; }
.ca-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); flex-wrap: wrap; }
.ca-line > span:first-child { word-break: break-all; }
.ca-line .ok { color: var(--disc); font-size: 10px; letter-spacing: .04em; white-space: nowrap; margin-left: auto; font-weight: 600; }
.ca-line .bad { color: var(--prem); font-size: 10px; letter-spacing: .04em; font-weight: 600; white-space: nowrap; margin-left: auto; }
.warn-box { border: 1px solid rgba(245,178,49,.4); background: var(--warn-wash); border-radius: var(--r-card); padding: 14px 16px; margin: 10px 0 16px; }
.warn-box h4 { font: 600 13px/1.2 var(--font); color: var(--warn); margin: 0 0 6px; }
.warn-box p { margin: 0 0 8px; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.warn-box .cas { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); display: grid; gap: 3px; word-break: break-all; } .warn-box .cas b { color: var(--warn); font-weight: 600; }
.warn-ack { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; } .warn-ack input { accent-color: var(--accent); width: 14px; height: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vis-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vis-opt { border: 1px solid var(--line2); border-radius: var(--r-card); padding: 12px 14px; cursor: pointer; background: transparent; text-align: left; transition: border-color .15s, background .15s; }
.vis-opt:hover { border-color: var(--ink-3); }
.vis-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); }
.vis-opt b { display: block; font: 600 13px/1.2 var(--font); margin-bottom: 3px; color: var(--ink); } .vis-opt[aria-pressed="true"] b { color: var(--accent); }
.vis-opt span { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; display: block; }

/* the pitch: the number the whole product is about */
.pitch { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--well); padding: 28px 28px 24px; margin-bottom: 14px; }
.pitch .kicker { font: 500 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.pitch .big { font-family: var(--mono); font-weight: 600; font-size: clamp(52px, 8vw, 96px); line-height: .9; letter-spacing: -.035em; color: var(--disc); display: block; }
.pitch .big.idle { color: var(--ink-4); }
.pitch .said { font: 500 15px/1.5 var(--font); color: var(--ink); margin: 18px 0 0; max-width: 32ch; } .pitch .said em { font-style: normal; font-weight: 600; color: var(--accent); }
.pitch .sub { color: var(--ink-3); font-size: 12px; margin-top: 8px; font-family: var(--mono); }
.compare { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.compare-row:last-child { border-bottom: 0; }
.compare-row.head { background: var(--well3); } .compare-row.head b { font: 500 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.compare-row .k { color: var(--ink-2); font-size: 12.5px; } .compare-row .k small { display: block; color: var(--ink-4); font-size: 10.5px; margin-top: 2px; font-family: var(--mono); }
.compare-row .v { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.compare-row.total { background: var(--well3); } .compare-row.total .k { color: var(--ink); font-weight: 600; } .compare-row.total .v { font-size: 15px; font-weight: 600; }
.v.good { color: var(--disc); } .v.bad { color: var(--prem); }
.share { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; background: var(--well); }
.share h4 { font: 600 13px/1 var(--font); margin: 0 0 4px; } .share p { margin: 0 0 10px; color: var(--ink-3); font-size: 11.5px; }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.link-row input { font: 400 11.5px/1 var(--mono); color: var(--ink-2); background: var(--field); border: 1px solid var(--line2); border-radius: 999px; padding: 9px 12px; min-width: 0; text-overflow: ellipsis; } .link-row input:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   My orders
   ============================================================ */
.status { font: 600 10.5px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; display: inline-block; }
.status.open { color: var(--disc); background: var(--disc-wash); } .status.filled { color: var(--ink); background: var(--well2); } .status.cancelled { color: var(--ink-3); background: var(--well3); } .status.expired { color: var(--warn); background: var(--warn-wash); }

/* ============================================================
   Fill sheet
   ============================================================ */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 90; opacity: 0; transition: opacity .2s ease; backdrop-filter: blur(2px); } .scrim.in { opacity: 1; }
.sheet { position: fixed; z-index: 100; top: 12px; right: 12px; bottom: 12px; width: 440px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-panel); box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; transform: translateX(calc(100% + 24px)); transition: transform .32s cubic-bezier(.32, .72, 0, 1); }
.sheet.in { transform: none; }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim { transition-duration: .01ms; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h3 { margin: 0; font: 600 17px/1.2 var(--font); letter-spacing: -.01em; }
.sheet-head .oid { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.x { background: var(--well3); border: 0; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; } .x:hover { color: var(--ink); background: var(--well2); }
.sheet-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }
.sheet-foot { padding: 16px 22px 20px; border-top: 1px solid var(--line); flex: none; }
.sheet-foot .fine { color: var(--ink-3); font-size: 11px; text-align: center; margin: 10px 0 0; }
.leg { border-radius: var(--r-card); padding: 16px 18px; background: var(--well2); }
.leg + .leg { margin-top: 8px; }
.leg .lbl { font: 500 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.leg .amt { font: 600 28px/1 var(--mono); letter-spacing: -.02em; } .leg .amt small { font-size: 13px; color: var(--sec-2); margin-left: 8px; font-weight: 600; font-family: var(--font); }
.leg .ca-line { margin-top: 8px; }
.kv { display: grid; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); } .kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); font-size: 12px; } .kv b { font: 500 12.5px/1 var(--mono); color: var(--ink); text-align: right; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 12px); opacity: 0; background: var(--panel); border: 1px solid var(--line2); color: var(--ink); padding: 12px 18px; border-radius: 999px; font-size: 12.5px; box-shadow: 0 12px 40px rgba(0,0,0,.4); transition: opacity .2s ease, transform .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.in { opacity: 1; transform: translate(-50%, 0); } .toast b { color: var(--accent); font-weight: 600; }

/* ============================================================
   Responsive
   ============================================================ */
.m-only { display: none; }
@media (max-width: 1180px) { .app { grid-template-columns: minmax(0, 1fr) 270px; } .create { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .create { grid-template-columns: minmax(0, 1fr); } .create-form { border-right: 0; border-bottom: 1px solid var(--line); } .create-out { order: -1; padding-bottom: 6px; }
  .chain-chip .long, .theme, .vsep { display: none; }
}
@media (max-width: 720px) {
  .m-only { display: block; }
  .top { padding: 12px 12px 0; } .pillbar { height: 56px; padding: 0 8px; } .logo { font-size: 16px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 70; background: var(--bar); backdrop-filter: blur(20px); border-top: 1px solid var(--barline); margin: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 4px; justify-content: stretch; }
  .nav button { flex: 1; justify-content: center; padding: 12px 4px; font-size: 12px; }
  .app { padding: 84px 12px 90px; gap: 12px; } .panel { border-radius: 22px; } .main { min-height: auto; }
  .strip { padding: 12px; gap: 8px; } .strip-label { display: none; }
  .pills { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; } .pills::-webkit-scrollbar { display: none; }
  .strip .seg { flex: none; } .strip .spacer { display: none; } .count { width: 100%; }
  .book thead { display: none; }
  .book, .book tbody, .book tr, .book td { display: block; width: 100%; }
  .book tbody tr { height: auto; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .book tbody tr[aria-selected="true"] td:first-child { box-shadow: none; }
  .book td { padding: 0; text-align: left; white-space: normal; } .book td.m-hide { display: none; }
  .m-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
  .m-card .m-pair { font: 600 15px/1.2 var(--font); grid-column: 1; color: var(--ink); } .m-card .m-pair .arrow { color: var(--accent); margin: 0 4px; }
  .m-card .m-edge { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
  .m-card .m-edge .edge { font-size: 16px; padding: 5px 10px; min-width: 0; }
  .m-card .m-edge .m-edge-lbl { display: block; font: 500 9.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
  .m-card .m-legs { grid-column: 1; font: 400 12px/1.5 var(--mono); color: var(--ink-2); } .m-card .m-legs b { color: var(--ink); font-weight: 600; }
  .m-card .m-meta { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font: 400 11px/1 var(--mono); color: var(--ink-3); }
  .empty { padding: 44px 20px; } .create-form, .create-out { padding-left: 14px; padding-right: 14px; } .view-head { padding: 18px 14px 14px; }
  .pitch { padding: 20px 18px 18px; } .pitch .big { font-size: clamp(46px, 15vw, 70px); } .pitch .said { font-size: 14px; }
  .row2 { grid-template-columns: 1fr; } .vis-toggle { grid-template-columns: 1fr; }
  .sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(100%); } .sheet.in { transform: none; }
  .toast { bottom: 84px; }
}

/* ============================================================
   Exchange layout (kevin's mock, 2026-09-14): title, stats row,
   post-order panel + public book side by side. Uses existing tokens
   only, so both themes work unchanged.
   ============================================================ */
.app-x { display: block; padding: 104px 32px 40px; }
.x-main { min-width: 0; }
.x-title h1 { font: 600 26px/1.2 var(--font); letter-spacing: -.02em; margin: 0 0 16px; }
.x-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.x-stat { padding: 18px 22px; border-radius: var(--r-card); display: flex; flex-direction: column; gap: 2px; }
.x-stat-k { font: 500 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.x-stat-n { font: 600 34px/1.15 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.x-stat-sub { font-size: 12px; color: var(--ink-3); }
.x-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.x-post, .x-book { border-radius: var(--r-card); }
.x-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.x-panel-head h2 { font: 600 17px/1.2 var(--font); letter-spacing: -.01em; margin: 0; }
.x-form { padding: 18px 22px 22px; }
.x-lbl { display: flex; align-items: baseline; justify-content: space-between; font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.x-lbl-note { font: 400 10.5px/1 var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink-4); }
.x-io { grid-template-columns: 148px 1fr; }
.x-io select { border-left: 0; border-right: 1px solid var(--line2); padding: 0 12px; }
.x-io input { font-size: 20px; padding: 14px; text-align: right; }
.x-io input::placeholder { color: var(--ink-4); }
.x-for { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 4px 0 14px; }
.x-for span { height: 1px; background: var(--line); }
.x-for b { font: 600 10.5px/1 var(--font); letter-spacing: .18em; color: var(--sec); }
.x-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.x-priv { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.x-priv b { display: block; font: 600 13px/1.3 var(--font); color: var(--ink); }
.x-hint { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; margin-top: 3px; }
.x-switch { position: relative; width: 44px; height: 24px; flex: none; border-radius: 999px; border: 1px solid var(--line2); background: var(--well2); cursor: pointer; transition: background .2s, border-color .2s; }
.x-switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-3); transition: transform .2s var(--ease), background .2s; }
.x-switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.x-switch[aria-checked="true"] i { transform: translateX(20px); background: var(--accent-ink); }
.x-sum { border: 1px solid var(--line); border-radius: var(--r-card); margin: 14px 0 16px; overflow: hidden; }
.x-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.x-sum > div:last-child { border-bottom: 0; }
.x-sum span { color: var(--ink-3); font-size: 12px; }
.x-sum b { font: 600 13px/1 var(--mono); color: var(--ink); text-align: right; }
.x-post .share { margin: 0 22px 22px; }
.x-strip { border-bottom: 1px solid var(--line); }
.x-tape { border-top: 1px solid var(--line); }
.x-mine { border-radius: var(--r-panel); }
@media (max-width: 1180px) { .x-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); } }
@media (max-width: 980px) { .x-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .app-x { padding: 84px 12px 90px; }
  .x-stats { gap: 10px; }
  .x-stat { padding: 14px 16px; }
  .x-stat-n { font-size: 28px; }
  .x-title h1 { font-size: 22px; margin-bottom: 12px; }
  .x-form { padding: 14px 14px 18px; }
  .x-panel-head { padding: 14px 14px 12px; }
  .x-io { grid-template-columns: 124px 1fr; }
  .x-io input { font-size: 17px; }
  .x-post .share { margin: 0 14px 18px; }
}

/* ============================================================
   Live data states (indexer connection, honest empties)
   Uses the existing tokens only, so both themes work unchanged.
   ============================================================ */
.conn { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font: 400 12px/1.5 var(--mono); color: var(--ink-2);
  padding: 9px 16px; margin-bottom: 12px; border-radius: 12px;
  background: var(--well3); border: 1px solid var(--line); }
.conn code { font-family: var(--mono); color: var(--ink); }
.conn.ok { color: var(--ink-2); }
.conn.ok::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--disc); flex: none; }
.conn.warn { color: var(--warn); background: var(--warn-wash); border-color: rgba(245,178,49,.28); }
.conn.bad { color: var(--prem); background: var(--prem-wash); border-color: rgba(255,110,122,.28); }
.conn.bad b, .conn.warn b { color: inherit; }
.conn .btn.sm { margin-left: auto; }

/* Machine-ish supporting note: an error string, a caveat, an address. */
.mono-note { font: 400 12px/1.6 var(--mono); color: var(--ink-3); word-break: break-word; }
.empty .mono-note { max-width: 46ch; margin: 0 auto 20px; }

.addr-chip.muted { background: var(--well2); color: var(--ink-3); }

.tape-empty { padding: 22px 20px; font: 400 12px/1.6 var(--font); color: var(--ink-3); text-align: center; }

/* Reclaimed is a real terminal state (escrow returned after expiry), distinct
   from cancelled, so it gets its own chip rather than being folded into one. */
.status.reclaimed { color: var(--sec-2); background: var(--well3); }

/* ============================================================
   WALLET + TRANSACTION UI
   Uses only existing design tokens so the visual language is unchanged.
   ============================================================ */

/* Header connect control. Lives in the same .ctl pill as the theme switch and
   the address chip, so the bar keeps its shape whether connected or not. */
.conn-btn { font: 600 12px/1 var(--font); height: 100%; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); transition: background .15s, color .15s, opacity .15s; }
.conn-btn:hover { background: var(--accent-2); }
.conn-btn:disabled { opacity: .55; cursor: default; }
/* Wrong network is a WARNING state, never a silent one: the button turns into
   the switch action and is coloured as a problem, not as a normal control. */
.conn-btn.wrong { background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.conn-btn.ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line2); }
.conn-btn.ghost:hover { color: var(--ink); background: var(--well3); }
.addr-chip.live { background: var(--disc-wash); color: var(--disc); cursor: pointer; }
.addr-chip.muted { background: var(--well2); color: var(--ink-3); }
.addr-chip.wrongnet { background: var(--warn-wash); color: var(--warn); }

/* Transaction panel: same geometry as the fill sheet, left of it, so a fill
   started from the sheet does not cover its own context. */
.txpanel { position: fixed; z-index: 120; top: 12px; right: 12px; bottom: 12px; width: 440px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-panel); box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; transform: translateX(calc(100% + 24px)); transition: transform .32s cubic-bezier(.32, .72, 0, 1); }
.txpanel.in { transform: none; }
.tx-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); flex: none; }
.tx-head h3 { margin: 0; font: 600 17px/1.2 var(--font); letter-spacing: -.01em; }
.tx-steps { padding: 8px 22px 18px; overflow-y: auto; flex: 1 1 auto; }
.tx-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); flex: none; }
.tx-foot .fine { color: var(--ink-3); font-size: 11px; margin: 10px 0 0; line-height: 1.5; }

/* One row per step. The dot carries the phase so approve-then-act reads as two
   distinct, individually-tracked operations. */
.tx-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.tx-step:last-child { border-bottom: 0; }
.tx-dot { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; border: 2px solid var(--line2); display: grid; place-items: center; font: 700 10px/1 var(--font); color: var(--ink-3); }
.tx-step.active .tx-dot { border-color: var(--accent); color: var(--accent); animation: txpulse 1.2s ease-in-out infinite; }
.tx-step.done .tx-dot { border-color: var(--disc); background: var(--disc); color: var(--accent-ink); }
.tx-step.skipped .tx-dot { border-color: var(--disc); color: var(--disc); }
.tx-step.failed .tx-dot { border-color: var(--prem); background: var(--prem); color: #fff; }
@keyframes txpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tx-step b { display: block; font: 600 13px/1.3 var(--font); color: var(--ink); }
.tx-step .tx-detail { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.tx-step .tx-phase { font: 500 10.5px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; display: inline-block; }
.tx-step.active .tx-phase { color: var(--accent); }
.tx-step.done .tx-phase { color: var(--disc); }
.tx-step.skipped .tx-phase { color: var(--disc); }
.tx-step.failed .tx-phase { color: var(--prem); }

/* Copyable hash. Monospace, full width, click to copy: a hash the user cannot
   copy is a hash they cannot check. */
.tx-hash { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
/* min-width:0 is required: without it the flex item refuses to shrink below the
   full 66-character hash and pushes Copy/Explorer outside the panel. */
.tx-hash code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); background: var(--well3); padding: 6px 9px; border-radius: 8px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-hash button { font: 600 10.5px/1 var(--font); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.tx-hash button:hover { border-color: var(--accent); color: var(--ink); }
.tx-hash a { font: 600 10.5px/1 var(--font); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink-2); text-decoration: none; flex: none; }
.tx-hash a:hover { border-color: var(--accent); color: var(--ink); }

/* Failure box. The DECODED sentence is the headline; the error name and the raw
   selector are secondary detail, never the primary message. */
.tx-error { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--prem-wash); border: 1px solid rgba(255,110,122,.35); }
.tx-error p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink); }
.tx-error .tx-ename { font: 600 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--prem); display: block; margin-bottom: 6px; }
.tx-error .tx-raw { font-family: var(--mono); font-size: 10px; color: var(--ink-4); margin-top: 8px; word-break: break-all; }
.tx-ok { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--disc-wash); border: 1px solid rgba(0,0,0,0); }
.tx-ok p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--disc); }

/* Wrong-network banner inside the sheet/create form. */
.net-warn { padding: 12px 14px; border-radius: 12px; background: var(--warn-wash); border: 1px solid var(--warn); margin-bottom: 14px; }
.net-warn p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.net-warn b { color: var(--warn); }

/* ============================================================
   Ported from the wired slip-site header (design-switch 2026-09-14):
   single theme toggle button, wallet-install notice, connect states.
   Uses this sheet's tokens so both themes work unchanged.
   ============================================================ */
.theme-btn { width: 40px; height: 100%; display: grid; place-items: center; border-radius: 999px; color: var(--ink-3); background: none; border: 0; cursor: pointer; transition: color .2s, background .2s, transform .15s var(--ease); }
.theme-btn:active { transform: scale(.94); }
.theme-btn:hover { color: var(--ink); background: var(--well3); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun, :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon, :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

.btn.conn-wrong { background: var(--warn-wash); color: var(--warn); border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.btn.conn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line2); }
.btn.conn-ghost:hover { color: var(--ink); background: var(--well3); }

.wallet-notice { position: absolute; top: calc(100% + 12px); right: 0; z-index: 70; width: min(320px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-card); box-shadow: var(--barshadow); padding: 14px 16px; text-align: left; }
.wallet-notice b { display: block; font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; padding-right: 22px; }
.wallet-notice p { margin: 0 0 10px; font: 400 12.5px/1.5 var(--font); color: var(--ink-2); }
.wallet-notice-links { display: flex; gap: 8px; }
.wallet-notice-links a { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-decoration: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line2); transition: background .15s, color .15s; }
.wallet-notice-links a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wallet-notice-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 16px; line-height: 1; color: var(--ink-3); background: none; border: 0; cursor: pointer; border-radius: 999px; }
.wallet-notice-x:hover { color: var(--ink); }
.ctl { position: relative; }
