/* DOGMA / ZERO GRAVITY
   Shared presentation layer. Market values, wallet flows and API contracts
   remain owned by the existing application. */
:root {
  --bg: #10110f;
  --bg-sunk: #0b0c0a;
  --panel: #191b17;
  --panel-2: #1d201a;
  --panel-3: #25291f;
  --hover: #2a3021;
  --line: #32372b;
  --line-soft: #272c23;
  --line-strong: #4a523e;
  --text: #dce0d3;
  --text-strong: #f5f6ef;
  --muted: #a6ae99;
  --muted-2: #8b957c;
  --brand: #ccff00;
  --brand-dim: #536315;
  --up: #72e3a2;
  --up-dim: #244e35;
  --down: #ff8c93;
  --down-dim: #63363b;
  --info: #b6c9ed;
  --warn: #f3ce77;
  --violet: #c4b0e5;
  --radius: 12px;
  --radius-lg: 18px;
  --row-h: 40px;
  --header-h: 80px;
  --sidebar-w: 218px;
  --sans: "Arial", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 16px 60px #0008;
  --shadow-sm: 0 4px 16px #0003;
}

html { scroll-padding-top: 100px; }
body { font-size: 14px; line-height: 1.6; }
body.dogma-terminal { overflow-x: clip; }
body.has-modal { overflow: hidden; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
::selection { color: #10110f; background: var(--brand); }
h1, h2, h3, h4 { font-family: var(--sans); }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 600; padding: 12px 20px; background: var(--brand); color: #10110f; border-radius: 6px; }
.skip-link:focus { top: 14px; }

/* App frame */
.masthead { background: #10110ff5; border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.masthead-bar { padding: 0 28px 0 22px; gap: 26px; }
.masthead-bar > .brand { width: calc(var(--sidebar-w) - 22px); }
.brand { gap: 11px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
.brand-name { display: block; font-family: var(--sans); font-size: 20px; line-height: 1.1; font-weight: 900; letter-spacing: -.7px; }
.brand-name > span { display: block; font-size: 9px; letter-spacing: 5px; margin-top: 5px; font-weight: 600; }
.header-location { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.header-location strong { color: var(--text); font-weight: 500; }
.status-strip { gap: 20px; font-size: 10px; }
.status-item { gap: 7px; }
.status-item b { color: var(--text-strong); }
.status-item > span:not(.pulse) { font-size: 9px; letter-spacing: .06em; }
.theme-tabs {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--bg-sunk); box-shadow: 2px 2px 0 var(--line-soft);
}
.theme-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 28px; padding: 5px 8px; border: 0; border-radius: 2px;
  background: transparent; color: var(--muted); cursor: pointer;
  font: 9px var(--mono); letter-spacing: .04em;
}
.theme-tabs button:hover { color: var(--text-strong); background: var(--panel-2); }
.theme-tabs button.is-on { color: #171a12; background: var(--brand); }
.theme-tabs svg { width: 13px; height: 13px; fill: currentColor; }
.nav {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); height: calc(100dvh - var(--header-h));
  padding: 13px 14px 22px; display: flex; flex-direction: column;
  gap: 3px; align-items: stretch; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); border-top: 0; border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.nav-heading { padding: 18px 14px 7px; color: var(--muted-2); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .17em; }
.nav > a { min-height: 38px; flex-shrink: 0; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; gap: 12px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.nav > a:hover { background: var(--panel-2); color: var(--text-strong); }
.nav > a.is-active { background: var(--brand); color: #171a12; border-color: var(--brand); font-weight: 700; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-lock { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.nav > a.is-active .nav-lock { color: #3c471b; }
.sidebar-toggle {
  min-height: 37px; flex: 0 0 auto; display: flex; align-items: center; gap: 11px;
  margin: 0 0 4px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--muted);
  font-size: 10px; cursor: pointer; transition: background .18s, border-color .18s, color .18s;
}
.sidebar-toggle:hover { background: var(--panel-2); border-color: var(--brand-dim); color: var(--text-strong); }
.sidebar-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; transition: transform .2s; }
.nav-orbit { margin: 26px 6px 0; padding: 17px 12px 12px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 12px; position: relative; }
.nav-orbit > strong { display: block; font-size: 16px; letter-spacing: -.5px; }
.nav-orbit > span:not(.orbit-glyph) { font-size: 10px; color: var(--muted); }
.nav-orbit .orbit-glyph { position: absolute; right: 10px; top: -19px; color: var(--brand); font-size: 37px; line-height: 1; transform: rotate(12deg); }
.nav-orbit a { display: flex; justify-content: space-between; margin-top: 12px; padding: 9px 0 0; border-top: 1px solid var(--line); color: var(--brand); font-size: 11px; letter-spacing: 0; text-transform: none; }
.nav-toggle { display: none; }
body > main.shell { margin: 0 0 0 var(--sidebar-w); padding: 30px; max-width: none; min-height: calc(100dvh - 80px); }
.nav,
.masthead-bar > .brand,
body > main.shell,
.tape,
.maintenance-banner,
.foot { transition: width .22s ease, margin-left .22s ease, padding .22s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
.grid > * { min-width: 0; }
.grid { gap: 18px; }
.g-main-side { grid-template-columns: minmax(0, 1fr) 290px; }
.g-side-main { grid-template-columns: 300px minmax(0, 1fr); }
.g-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-head { align-items: center; gap: 18px; margin-bottom: 26px; }
.page-title { gap: 7px; }
.page-title h1 { font-size: clamp(27px, 2.8vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -1.2px; }
.page-title .eyebrow, .eyebrow { font: 9px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.page-title p { font-size: 12px; line-height: 1.7; max-width: 68ch; }
.page-head > .btn-group { margin-left: auto; }
.tape { margin-left: var(--sidebar-w); background: var(--bg-sunk); border-color: var(--line); }
.tape-label { background: var(--panel-2); border-right-color: var(--line); color: var(--brand); }
.maintenance-banner { margin-left: var(--sidebar-w); padding: 12px 28px; background: var(--panel-3); color: var(--brand); text-align: center; font-size: 12px; }

/* The doodles live in editorial areas; trading data keeps a quiet surface. */
.gravity-banner {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center;
  position: relative; isolation: isolate; overflow: hidden; min-height: 292px;
  background: var(--brand); color: #171a12; border: 1px solid var(--brand);
  border-radius: 18px; padding: 32px 36px 38px; margin-bottom: 24px;
}
.gravity-banner::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; background-image: radial-gradient(#171a1222 .7px, transparent .7px); background-size: 7px 7px; opacity: .35; }
.gravity-banner::after {
  content: ''; position: absolute; right: 18px; top: 18px; width: 7px; height: 7px;
  background: #171a12; opacity: .48; pointer-events: none;
  box-shadow: 9px 0 #171a12, 18px 0 #171a12, 27px 0 #171a12,
              0 9px #171a12, 27px 9px #171a12,
              0 18px #171a12, 9px 18px #171a12, 18px 18px #171a12, 27px 18px #171a12,
              9px 27px #171a12, 18px 27px #171a12;
  animation: pixel-float 4s steps(4, end) infinite;
}
@keyframes pixel-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, 4px); }
}
.gravity-copy { position: relative; z-index: 2; }
.sticker-label { display: inline-block; padding: 5px 9px; border: 1px solid #171a1266; border-radius: 3px; font: 9px var(--mono); letter-spacing: .09em; text-transform: uppercase; transform: rotate(-2deg); }
.gravity-copy h2 { font-size: clamp(32px, 4vw, 56px); color: #171a12; line-height: 1.01; letter-spacing: -2.6px; font-weight: 900; margin: 18px 0 14px; }
.gravity-copy h2 > span { -webkit-text-stroke: 1.2px #171a12; color: transparent; }
.gravity-copy > p { font-size: 12px; line-height: 1.7; max-width: 43ch; margin-bottom: 20px; color: #354218; }
.gravity-art { align-self: stretch; position: relative; display: grid; place-items: center; min-width: 0; }
.gravity-art > img { width: 100%; height: 100%; max-height: 290px; object-fit: contain; transform: rotate(-5deg) scale(1.1); }
.art-note { position: absolute; bottom: 2px; right: 16%; font: italic 17px "Comic Sans MS", "Chalkboard SE", cursive; transform: rotate(-7deg); white-space: nowrap; }
.banner-edition { position: absolute; bottom: 10px; left: 36px; font: 8px var(--mono); letter-spacing: .17em; opacity: .65; }
.btn.btn-ink { background: #171a12; border-color: #171a12; color: #f0f5df; border-radius: 7px; min-height: 40px; font-weight: 600; }
.btn.btn-ink:hover { background: #2d3620; border-color: #2d3620; transform: translateY(-2px); box-shadow: 3px 3px 0 #171a1255; }
.btn-ink > span { margin-left: 20px; font-size: 18px; }
.gravity-banner :focus-visible { outline-color: #171a12; }
.section-kicker { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 25px 0 14px; }
.section-kicker h2 { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.section-kicker > span { color: var(--muted-2); font: 10px var(--mono); }
.section-kicker > span > span { color: var(--brand); margin-left: 9px; font-size: 18px; }

/* Panels, market tables and stats */
.panel { border-radius: var(--radius); background: var(--panel); }
.panel-head { padding: 15px 18px; gap: 10px; min-height: 54px; flex-wrap: wrap; background: transparent; }
.panel-head h2, .panel-head h3 { font-family: var(--sans); text-transform: none; font-size: 13px; font-weight: 600; letter-spacing: -.1px; }
.panel-body { padding: 18px; }
.panel-body.is-flush { padding: 0; }
.panel-foot { padding: 11px 18px; color: var(--muted-2); font-size: 10px; background: transparent; }
.panel-foot a { white-space: nowrap; }
.stat { position: relative; padding: 20px; border-radius: 12px; background: var(--panel); }
.stat .k { font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--muted); margin-bottom: 13px; padding-right: 20px; }
.stat .v { font-family: var(--sans); font-size: 29px; font-weight: 600; letter-spacing: -1px; }
.stat .d { margin-top: 9px; font-size: 10px; line-height: 1.6; }
.overview-stats .stat::after { content: '↗'; position: absolute; right: 18px; top: 16px; color: var(--muted-2); font-size: 18px; }
.overview-stats .stat:first-child { border-color: var(--brand-dim); background: #202719; }
.overview-stats .stat:first-child .v, .overview-stats .stat:first-child::after { color: var(--brand); }
.overview-stats { margin-bottom: 24px; }
table.dt { font-size: 11px; }
table.dt thead th { padding: 12px 14px; font-family: var(--sans); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; background: #151812; border-color: var(--line); }
table.dt tbody td { padding: 8px 14px; height: 42px; }
table.dt.is-roomy tbody td { height: 52px; }
table.dt tbody tr.is-selected { background: #ccff0010; }
table.dt tbody tr:last-child { border-bottom: 0; }
table.dt tbody td.up { color: var(--up); }
table.dt tbody td.down { color: var(--down); }
table.dt tbody td.brand { color: var(--brand); display: table-cell; }
table.dt tbody tr.is-empty td { padding: 34px 22px; height: 135px; white-space: normal; line-height: 1.8; }
table.dt tbody tr.is-empty td strong { color: var(--text-strong); font-size: 14px; }
.sym { font-family: var(--sans); font-size: 12px; }
.sym-sub { font-family: var(--sans); font-size: 10px; }
.tag { font-size: 8px; font-weight: 500; letter-spacing: .05em; padding: 4px 7px; border-radius: 5px; }
.tag-brand { color: var(--brand); border-color: var(--brand-dim); background: #ccff000a; }
.tag-indicative { color: var(--warn); border-color: #675633; background: #f3ce7709; }
.tag-info { border-color: #3b465b; background: #b6c9ed09; }
.quote-lines .ql { padding-top: 9px; padding-bottom: 9px; gap: 14px; }
.quote-lines .ql .k { font-family: var(--sans); font-size: 11px; min-width: 0; }
.quote-lines .ql .v { font-size: 11px; overflow-wrap: anywhere; min-width: 0; text-align: right; }
.quote-lines .ql.is-total { border-color: var(--brand-dim); background: #ccff000a; }
.book-row { min-height: 37px; }
.book-row.is-best { background: #ccff000d; }

/* Controls */
.btn, .btn-connect { min-height: 38px; height: auto; padding: 9px 15px; border-radius: 7px; font-family: var(--sans); font-size: 11px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; transition: background .15s, border-color .15s, transform .15s; }
.btn-connect { background: var(--brand); color: #171a12; border-color: var(--brand); padding: 11px 17px; min-height: 40px; }
.btn-connect:hover, .btn-primary:hover { background: #e2ff59; border-color: #e2ff59; color: #171a12; }
.btn-primary { color: #171a12; }
.btn-sm { min-height: 28px; padding: 6px 10px; font-size: 10px; border-radius: 5px; }
.btn-lg { min-height: 46px; padding: 13px 22px; font-size: 12px; }
.btn-icon { min-height: 34px; min-width: 34px; padding: 4px; }
.btn-group { gap: 8px; }
.btn:disabled, .btn.is-disabled { transform: none; }
.wallet-chip { height: 40px; border-radius: 7px; }
.wallet-chip > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.wallet-slot .btn-connect { max-width: 185px; text-align: center; white-space: normal; }
.wallet-avatar { background: var(--brand); border-radius: 50%; }
.wallet-menu { width: 316px; padding: 9px; overflow: hidden; border-radius: 17px 6px 17px 17px; background: var(--panel); box-shadow: 6px 7px 0 #0005, 0 24px 70px #0008; }
.wallet-menu .wm-head { position: relative; margin: 0 0 8px; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px 4px 11px 11px; background: radial-gradient(circle at 94% 0, #ccff0019, transparent 40%), var(--panel-2); }
.wallet-menu .wm-head::after { content: ''; position: absolute; right: 11px; top: 11px; width: 4px; height: 4px; background: var(--brand); box-shadow: 6px 0 var(--brand), 12px 0 var(--brand), 12px 6px var(--brand); opacity: .4; }
.wallet-menu .wm-account { display: flex; align-items: center; gap: 10px; }
.wallet-menu .wm-provider-mark { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; padding: 7px; object-fit: contain; border: 1px solid var(--brand-dim); border-radius: 10px; background: var(--bg-sunk); color: var(--brand); }
.wallet-menu .wm-provider-mark svg { width: 20px; height: 20px; }
.wallet-menu .wm-identity { min-width: 0; }
.wallet-menu .wm-identity strong { display: block; overflow: hidden; color: var(--text-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-menu .wm-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--warn); font: 7px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.wallet-menu .wm-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.wallet-menu .wm-status.is-signed { color: var(--up); }
.wallet-menu .wm-address-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 7px 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-sunk); }
.wallet-menu .wm-addr { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.wallet-menu .wm-copy { width: 27px; height: 27px; min-height: 27px; flex: 0 0 27px; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.wallet-menu .wm-section-label { padding: 7px 8px 5px; color: var(--muted-2); font: 7px var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.wallet-menu .wm-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.wallet-menu a, .wallet-menu button { min-height: 38px; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--text); font-size: 10px; }
.wallet-menu a:hover, .wallet-menu button:hover { border-color: var(--line); background: var(--hover); }
.wallet-menu .wm-action-grid a { background: var(--panel-2); }
.wallet-menu .wm-icon { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; color: var(--muted); }
.wallet-menu .wm-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.wallet-menu .wm-trailing-icon { width: 14px; height: 14px; margin-left: auto; opacity: .55; }
.wallet-menu .wm-trailing-icon svg { width: 14px; height: 14px; }
.wallet-menu .wm-explorer { margin-bottom: 3px; background: transparent; }
.wallet-menu .wm-sign-in { margin-top: 9px; justify-content: center; border-color: var(--brand); background: var(--brand); color: #171a12; font-weight: 700; }
.wallet-menu .wm-sign-in .wm-icon { color: currentColor; }
.wallet-menu .wm-sign-in:hover { border-color: #e2ff59; background: #e2ff59; color: #171a12; }
.wallet-menu .wm-danger { min-height: 34px; justify-content: center; margin-top: 5px; color: var(--down); font-size: 9px; }
.wallet-menu .wm-danger .wm-icon { color: currentColor; }
input[type=text], input[type=number], input[type=email], input[type=search], input[type=url], select, textarea { border-color: var(--line-strong); border-radius: 7px; min-height: 40px; background-color: #11140e; font-size: 12px; }
label.field > span.lbl { font-family: var(--sans); font-size: 11px; text-transform: none; letter-spacing: 0; margin-bottom: 8px; }
label.field > span.hint { font-size: 10px; line-height: 1.7; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px #ccff000c; }
select { background-position: calc(100% - 15px) 18px, calc(100% - 10px) 18px; }
.amount-field { min-height: 84px; border-radius: 10px; padding: 14px; background: var(--bg-sunk); }
.amount-field input { width: 100%; min-width: 0; min-height: 0; font-family: var(--sans); font-size: 30px; font-weight: 600; border-radius: 0; box-shadow: none; }
.amount-field .asset { max-width: 50%; }
.amount-field .asset select { max-width: 100%; min-height: 32px; }
.chip { min-height: 30px; padding: 6px 10px; border-radius: 6px; font-family: var(--sans); font-size: 10px; }
.chip.is-on { background: #ccff0012; color: var(--brand); border-color: var(--brand-dim); }
.seg { border-radius: 7px; }
.seg button { min-height: 34px; font-size: 10px; font-family: var(--sans); letter-spacing: 0; }
.seg button.is-on { color: #171a12; }
.tabs button, .tabs a { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; padding: 13px 18px; }
.notice { border-radius: 9px; border-left-width: 3px; padding: 13px 16px; font-size: 11px; background: #1c2016; line-height: 1.8; margin-bottom: 20px; }
.notice strong { margin-right: 5px; }
.notice a { margin-left: 6px; white-space: normal; }
.notice .ico { color: var(--warn); }
.modal { border-radius: 16px; }
.modal-head { padding: 18px 22px; }
.modal-title { font-family: var(--sans); text-transform: none; font-size: 16px; letter-spacing: -.4px; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; }
.modal-body { padding: 22px; }
.toast-stack { max-width: min(380px, calc(100vw - 36px)); }
.toast { border-radius: 10px; }

/* Charts and wallet gates have honest empty states, not placeholder prices. */
.chart-empty { min-height: 200px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; padding: 26px; text-align: center; font: 11px/1.7 var(--sans); color: var(--muted); background-image: linear-gradient(#8b957c08 1px, transparent 1px), linear-gradient(90deg, #8b957c08 1px, transparent 1px); background-size: 32px 32px; }
.chart-empty::before { content: '✳'; color: var(--brand); font: 36px/1 var(--sans); }
.chart { border-radius: 7px; }
.connect-gate { min-height: 530px; background: radial-gradient(ellipse at 50% 20%, #ccff000b, transparent 55%), var(--panel); }
.connect-gate > .panel-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 65px 24px; }
.connect-gate h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -2px; margin-top: 12px; }
.connect-gate p { font-size: 13px; line-height: 1.8; }
.gate-orbit { position: relative; width: 164px; height: 130px; display: grid; place-items: center; margin-bottom: 25px; }
.gate-orbit::before { content: ''; position: absolute; width: 160px; height: 58px; border: 1px solid var(--brand-dim); border-radius: 50%; transform: rotate(-28deg); }
.gate-orbit::after { content: '✳'; position: absolute; right: -10px; top: 5px; color: var(--brand); font-size: 27px; }
.gate-orbit img { position: relative; border-radius: 20px; transform: rotate(-9deg); border: 5px solid var(--brand); }

/* A small pixel signal follows the interface without covering market data. */
body.dogma-terminal::after {
  content: ''; position: fixed; right: 20px; bottom: 20px; z-index: 190;
  width: 7px; height: 7px; background: var(--brand); opacity: .11;
  box-shadow: 9px 0 var(--brand), 18px 0 var(--brand),
              0 9px var(--brand), 18px 9px var(--brand), 27px 9px var(--brand),
              9px 18px var(--brand), 18px 18px var(--brand),
              18px 27px var(--brand), 27px 27px var(--brand);
  pointer-events: none; animation: pixel-drift 6s steps(6, end) infinite;
}
@keyframes pixel-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Landing page */
.gravity-hero { min-height: 490px; grid-template-columns: 1.1fr 1fr; padding: 50px 42px; }
.gravity-hero h1 { color: #171a12; font-size: clamp(45px, 5.4vw, 82px); line-height: .99; font-weight: 900; letter-spacing: -.06em; margin: 27px 0 24px; }
.gravity-hero h1 > span { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }
.gravity-hero .gravity-art > img { max-height: 420px; transform: rotate(-5deg) scale(1.2); }
.gravity-hero .art-note { bottom: 25px; font-size: 20px; }
.gravity-hero .gravity-copy > p { max-width: 44ch; font-size: 13px; }
.hero-actions { justify-content: flex-start; align-items: center; gap: 22px; }
.hero-text-link { color: #171a12; font-size: 12px; font-weight: 600; }
.hero-text-link:hover { color: #171a12; }
.hero-chain { margin-top: 30px; font: 10px var(--mono); }
.hero-chain > span { display: block; margin-top: 5px; font-size: 9px; opacity: .7; }
.home-content > .section-kicker { margin-top: 36px; }
.section { padding: 42px 0; }
.section-head { max-width: 70ch; }
.section-head h2 { font-size: clamp(25px, 3vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -1.4px; margin: 13px 0 17px; }
.section-head p { font-size: 13px; }
.feature { padding: 25px; border-radius: 12px; }
.feature h3 { font-size: 17px; letter-spacing: -.5px; margin-bottom: 12px; }
.feature p { font-size: 12px; }
.feature-number { display: flex; justify-content: space-between; align-items: center; font: 10px var(--mono); color: var(--muted); margin-bottom: 24px; }
.feature-number > span { font: 36px/1 var(--sans); color: var(--brand); transform: rotate(-12deg); }
.execution-principle { display: flex; align-items: center; gap: 20px; padding: 24px 4px 30px; }
.execution-principle > span { color: var(--brand); font-size: 50px; line-height: 1; }
.execution-principle > strong { font-size: 22px; letter-spacing: -.6px; line-height: 1.2; }

/* Responsive trading layouts replace fixed inline column widths. */
.terminal-workspace { grid-template-columns: 210px minmax(0, 1fr) 280px; align-items: start; gap: 14px; }
.route-workspace { grid-template-columns: 350px minmax(0, 1fr); }
.book-controls { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 150px 100px; gap: 10px; align-items: end; }
.docs-workspace { grid-template-columns: 210px minmax(0, 1fr); }
.terminal-mobile-tabs { display: none; }
.terminal-workspace .panel-head { padding: 12px; }
.terminal-workspace .panel-body { padding: 12px; }
.terminal-workspace .panel-body.is-flush { padding: 0; }
body[data-page=terminal] .page-title h1 { font-size: 28px; }
body[data-page=terminal] .page-head { margin-bottom: 22px !important; }
.foot { margin-left: var(--sidebar-w); padding: 34px 30px 0; background: #0d0f0b; }
.foot-grid { gap: 28px; grid-template-columns: 1.6fr repeat(4, 1fr); }
.foot .brand { margin-bottom: 16px; }
.foot .brand-logo { width: 34px; height: 34px; border-radius: 7px; }
.foot .brand-name { font-size: 16px; }
.foot .brand-name > span { font-size: 7px; letter-spacing: 4px; }
.foot .blurb { font-size: 11px; max-width: 35ch; }
.foot h4 { font-family: var(--sans); text-transform: none; font-size: 12px; letter-spacing: 0; }
.foot ul a { font-size: 11px; }
.foot-bar { gap: 12px; flex-wrap: wrap; margin-top: 28px; padding: 18px 0; font-size: 9px; line-height: 1.8; }

/* Lime mode turns the logo colour into the ground and uses ink for emphasis. */
html[data-dogma-theme="lime"] {
  --bg: #ccff00;
  --bg-sunk: #b9e800;
  --panel: #ddff54;
  --panel-2: #d2fa32;
  --panel-3: #c1eb12;
  --hover: #e8ff8c;
  --line: #819b19;
  --line-soft: #a3c530;
  --line-strong: #53660b;
  --text: #283308;
  --text-strong: #0f1405;
  --muted: #46570d;
  --muted-2: #5e701a;
  --brand: #11150a;
  --brand-dim: #5b6e0f;
  --up: #087442;
  --up-dim: #70ad82;
  --down: #a61f31;
  --down-dim: #ca6975;
  --info: #263d78;
  --warn: #684400;
  --violet: #553184;
  --shadow: 0 16px 60px #53660042;
  --shadow-sm: 0 4px 16px #53660033;
}
html[data-dogma-theme="lime"] body { background: var(--bg); color: var(--text); }
html[data-dogma-theme="lime"] ::selection { color: #ccff00; background: #11150a; }
html[data-dogma-theme="lime"] :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-color: #11150a; }
html[data-dogma-theme="lime"] .skip-link { background: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .masthead { background: #ccff00f2; }
html[data-dogma-theme="lime"] .theme-tabs { background: #b9e800; box-shadow: 2px 2px 0 #718711; }
html[data-dogma-theme="lime"] .theme-tabs button.is-on { background: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .wallet-menu .wm-provider-mark { background: #11150a; color: #ccff00; border-color: #11150a; }
html[data-dogma-theme="lime"] .wallet-menu .wm-sign-in { background: #11150a; border-color: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .wallet-menu .wm-sign-in:hover { background: #2c360f; border-color: #2c360f; color: #dfff54; }
html[data-dogma-theme="lime"] .nav > a.is-active { background: #11150a; border-color: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .nav > a.is-active .nav-lock { color: #ccff00; }
html[data-dogma-theme="lime"] .nav-orbit { background: #dfff63; border-color: #53660b; }
html[data-dogma-theme="lime"] .gravity-banner { background: #ddff54; color: #171a12; border-color: #11150a; }
html[data-dogma-theme="lime"] .overview-stats .stat:first-child { background: #d2fa32; border-color: #53660b; }
html[data-dogma-theme="lime"] .overview-stats .stat:first-child .v,
html[data-dogma-theme="lime"] .overview-stats .stat:first-child::after { color: #11150a; }
html[data-dogma-theme="lime"] table.dt thead th { background: #c4ef16; }
html[data-dogma-theme="lime"] table.dt tbody tr.is-selected { background: #11150a0d; }
html[data-dogma-theme="lime"] .tag-brand,
html[data-dogma-theme="lime"] .quote-lines .ql.is-total,
html[data-dogma-theme="lime"] .book-row.is-best { background: #11150a0d; }
html[data-dogma-theme="lime"] .btn-connect,
html[data-dogma-theme="lime"] .btn-primary { background: #11150a; border-color: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .btn-connect:hover,
html[data-dogma-theme="lime"] .btn-primary:hover { background: #2c360f; border-color: #2c360f; color: #dfff54; }
html[data-dogma-theme="lime"] input[type=text],
html[data-dogma-theme="lime"] input[type=number],
html[data-dogma-theme="lime"] input[type=email],
html[data-dogma-theme="lime"] input[type=search],
html[data-dogma-theme="lime"] input[type=url],
html[data-dogma-theme="lime"] select,
html[data-dogma-theme="lime"] textarea { background-color: #e7ff85; color: #11150a; }
html[data-dogma-theme="lime"] input:focus,
html[data-dogma-theme="lime"] select:focus,
html[data-dogma-theme="lime"] textarea:focus { box-shadow: 0 0 0 3px #11150a1c; }
html[data-dogma-theme="lime"] .chip.is-on,
html[data-dogma-theme="lime"] .seg button.is-on { background: #11150a; border-color: #11150a; color: #ccff00; }
html[data-dogma-theme="lime"] .notice { background: #d5fc3e; }
html[data-dogma-theme="lime"] .connect-gate { background: radial-gradient(ellipse at 50% 20%, #ffffff55, transparent 55%), var(--panel); }
html[data-dogma-theme="lime"] .chart-empty { background-image: linear-gradient(#11150a0a 1px, transparent 1px), linear-gradient(90deg, #11150a0a 1px, transparent 1px); }
html[data-dogma-theme="lime"] .foot { background: #b9e800; }
html[data-dogma-theme="lime"] body.dogma-terminal::after { opacity: .15; }

body,
.masthead,
.nav,
.panel,
.stat,
.foot,
.tape,
.theme-tabs,
input,
select,
textarea { transition: background-color .18s ease, border-color .18s ease, color .18s ease; }

@media (min-width: 801px) {
  body.nav-collapsed { --sidebar-w: 72px; }
  body.nav-collapsed .masthead-bar > .brand { justify-content: flex-start; }
  body.nav-collapsed .masthead-bar > .brand > span { display: none; }
  body.nav-collapsed .nav { padding-inline: 10px; }
  body.nav-collapsed .sidebar-toggle { justify-content: center; padding-inline: 0; }
  body.nav-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
  body.nav-collapsed .sidebar-toggle > span,
  body.nav-collapsed .nav-heading,
  body.nav-collapsed .nav > a > span,
  body.nav-collapsed .nav-orbit,
  body.nav-collapsed .nav-system-status { display: none; }
  body.nav-collapsed .nav > a { justify-content: center; padding-inline: 0; gap: 0; }
  body.nav-collapsed .nav > a .nav-icon { width: 20px; height: 20px; flex-basis: 20px; }
}

@media (min-width: 1680px) {
  :root { --sidebar-w: 240px; }
  body > main.shell { padding: 36px 44px; }
  .g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gravity-banner { min-height: 310px; }
  .gravity-copy h2 { font-size: 62px; }
  .terminal-workspace { grid-template-columns: 260px minmax(0, 1fr) 330px; }
}
@media (max-width: 1350px) {
  .header-location { display: none; }
  .terminal-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .terminal-workspace > [data-terminal-panel=ticket] { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main-side { grid-template-columns: minmax(0, 1fr) 250px; }
  .dashboard-markets { grid-template-columns: minmax(0, 1fr); }
  .dashboard-markets > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-controls { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .book-controls > .field:nth-of-type(3) { grid-column: 1 / 3; }
  .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .foot .blurb { max-width: 70ch; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 190px; }
  .masthead-bar { gap: 18px; }
  .nav { padding-right: 10px; padding-left: 10px; }
  body > main.shell { padding: 24px; }
  .gravity-banner { padding: 28px; grid-template-columns: 1.3fr 1fr; }
  .gravity-copy h2 { font-size: 42px; letter-spacing: -2px; }
  .gravity-art > img { transform: rotate(-5deg) scale(1.2); }
  .art-note { font-size: 13px; right: 0; }
  .gravity-hero { min-height: 450px; }
  .gravity-hero h1 { font-size: 52px; }
  .gravity-hero .art-note { font-size: 15px; }
  .g-main-side, .g-side-main, .route-workspace, .docs-workspace { grid-template-columns: minmax(0, 1fr); }
  .route-workspace > .panel:first-child { max-width: 560px; width: 100%; justify-self: center; }
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-content .g-3 { grid-template-columns: minmax(0, 1fr); }
  .feature { display: grid; grid-template-columns: 50px 1fr; column-gap: 22px; }
  .feature-number { grid-row: span 2; flex-direction: column; align-items: flex-start; margin-bottom: 0; }
  .feature h3, .feature p { grid-column: 2; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
  .status-strip { gap: 14px; }
  .status-strip .status-item:nth-child(2) { display: none; }
  .theme-tabs button { padding: 5px 7px; }
  .theme-tabs button > span { display: none; }
  .panel-head { padding: 14px; }
}
@media (max-width: 800px) {
  :root { --sidebar-w: 0px; --header-h: 72px; }
  .masthead-bar { padding: 0 18px; gap: 12px; }
  .masthead-bar > .brand { width: auto; }
  .brand-logo { width: 36px; height: 36px; border-radius: 8px; }
  .brand-name { font-size: 17px; }
  .brand-name > span { font-size: 7px; letter-spacing: 4px; }
  .status-strip { gap: 12px; }
  .status-strip .status-hide-sm { display: none; }
  .sidebar-toggle { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 42px; height: 42px; flex-shrink: 0; padding: 11px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--panel); cursor: pointer; }
  .nav-toggle span { width: 18px; height: 1px; background: currentColor; transition: transform .15s; }
  .nav-toggle[aria-expanded=true] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded=true] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-height: calc(100dvh - 72px); height: auto; bottom: auto; padding: 12px 20px 22px; border-right: 0; border-bottom: 1px solid var(--line-strong); box-shadow: var(--shadow); }
  .nav:not(.is-ready) { position: static; }
  .nav.is-ready:not(.is-open) { display: none; }
  .nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
  .nav-heading, .nav-orbit { grid-column: 1 / -1; }
  .nav-system-status { grid-column: 1 / -1; }
  .nav > a { min-height: 44px; font-size: 13px; }
  .nav-orbit { display: none; }
  .nav-heading { padding-top: 12px; }
  body > main.shell { padding: 24px 18px; }
  .page-head > .btn-group { margin-left: 0; }
  .g-6, .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { padding: 30px 20px 0; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot ul a { display: inline-flex; padding: 4px 0; }
  .page-title p { max-width: 60ch; }
  .docs-workspace > .panel[style] { position: static !important; }
}
@media (max-width: 600px) {
  body > main.shell { padding: 22px 14px; }
  .masthead-bar { padding: 0 14px; gap: 10px; }
  .brand { gap: 8px; }
  .masthead-bar > .brand .brand-name { display: none; }
  .status-strip .status-item { display: none; }
  .theme-tabs { box-shadow: none; }
  .theme-tabs button { width: 28px; padding: 5px; }
  .btn-connect { padding: 10px 12px; font-size: 11px; }
  .wallet-chip .bal { display: none; }
  .wallet-chip { max-width: 144px; }
  .wallet-slot .btn-connect { max-width: 140px; }
  .wallet-menu { position: fixed; top: 79px; right: 14px; width: min(300px, calc(100vw - 28px)); }
  .page-head { margin-bottom: 22px; gap: 14px; }
  .page-title h1 { font-size: 29px; }
  .page-title p { font-size: 12px; }
  .gravity-banner { grid-template-columns: minmax(0, 1fr); padding: 26px 24px 30px; border-radius: 14px; }
  .gravity-copy h2 { font-size: 44px; }
  .gravity-copy > p { max-width: 34ch; }
  .gravity-art { height: 195px; margin-top: 3px; }
  .gravity-art > img { width: 270px; max-width: 100%; height: 210px; transform: rotate(-5deg) scale(1.12); }
  .art-note { right: 5%; bottom: 0; font-size: 13px; }
  .banner-edition { left: 24px; font-size: 7px; letter-spacing: .09em; }
  .gravity-hero { padding: 30px 24px; }
  .gravity-hero h1 { font-size: clamp(42px, 12vw, 64px); margin: 24px 0 20px; }
  .gravity-hero .gravity-art { height: 245px; }
  .gravity-hero .gravity-art > img { width: 310px; height: 245px; }
  .gravity-hero .art-note { bottom: 5px; }
  .hero-chain { margin-top: 22px; }
  .hero-actions { gap: 17px; }
  .g-6, .g-5, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3, .dashboard-markets > .grid { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 12px; }
  .stat { padding: 16px; }
  .stat .v { font-size: 26px; }
  .stat .k { font-size: 10px; margin-bottom: 10px; }
  .stat .d { font-size: 10px; }
  .overview-stats .stat::after { right: 12px; top: 10px; font-size: 15px; }
  .section-kicker { align-items: flex-start; }
  .section-kicker > span { max-width: 130px; font-size: 8px; text-align: right; }
  .section-kicker h2 { font-size: 13px; }
  .panel-head { padding: 13px 14px; }
  .panel-body { padding: 14px; }
  .panel-foot { padding: 10px 14px; }
  table.dt tbody tr.is-empty td { padding: 28px 18px; }
  input[type=text], input[type=number], input[type=email], input[type=search], input[type=url], select, textarea { font-size: 16px; min-height: 44px; }
  .chip { min-height: 36px; }
  .seg button { min-height: 38px; padding: 0 12px; }
  .btn { min-height: 40px; }
  .btn-icon { min-height: 44px; min-width: 44px; }
  .terminal-workspace { grid-template-columns: minmax(0, 1fr); }
  .terminal-workspace > [data-terminal-panel=ticket] { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .terminal-mobile-tabs.is-ready { display: flex; width: 100%; margin-bottom: 14px; }
  .terminal-mobile-tabs button { flex: 1; }
  .terminal-workspace.is-tabbed > [data-terminal-panel]:not(.is-visible) { display: none; }
  #tm-list { max-height: 60dvh !important; }
  #mk-search { width: 100% !important; flex: 1 1 100%; }
  .book-controls { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 8px; }
  .book-controls .field:nth-of-type(3) { grid-column: 1 / 3; }
  .book-controls > .btn:last-child { padding: 10px 8px; }
  .connect-gate { min-height: 480px; }
  .connect-gate > .panel-body { padding: 42px 20px; }
  .foot-bar { font-size: 8px; }
}

/* Dashboard composition: editorial entry, quick paths, and a softer data bento. */
body[data-page="dashboard"] > main.shell { padding-top: 26px; }
.dashboard-page { max-width: 1560px; margin: 0 auto; }
.dashboard-page > * { animation: dashboard-rise .5s both; }
.dashboard-page > *:nth-child(2) { animation-delay: .04s; }
.dashboard-page > *:nth-child(3) { animation-delay: .08s; }
.dashboard-page > *:nth-child(4) { animation-delay: .12s; }
.dashboard-page > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes dashboard-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.dashboard-page-head { position: relative; min-height: 94px; padding: 5px 3px 12px; }
.dashboard-page-head .page-title { max-width: 680px; }
.dashboard-page-head .page-title h1 { font-size: clamp(34px, 3.5vw, 48px); letter-spacing: -2.2px; }
.dashboard-live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--brand); box-shadow: 8px 0 0 var(--brand-dim); transform: translateY(-1px); }
.dashboard-page-head .btn { border-radius: 999px; padding-inline: 19px; }

.dashboard-page .gravity-banner { min-height: 330px; margin-bottom: 20px; padding: 38px 42px 43px; border-radius: 26px 26px 76px 26px; box-shadow: 8px 8px 0 #526515; }
.dashboard-page .gravity-copy h2 { max-width: 690px; }
.dashboard-page .gravity-art > .gravity-orbit-art { filter: drop-shadow(13px 16px 0 #171a1215); opacity: .58; }
.dashboard-logo-3d {
  position: absolute; left: 50%; top: 46%; z-index: 2;
  width: min(65%, 310px); aspect-ratio: 1; transform: translate(-50%, -50%);
  filter: drop-shadow(14px 18px 0 #171a121b); pointer-events: none;
}
.dashboard-logo-3d::before {
  content: ''; position: absolute; inset: 12%; border: 1px dashed #171a125c;
  border-radius: 50%; animation: dashboard-logo-orbit 16s linear infinite;
}
.dashboard-logo-3d::after {
  content: ''; position: absolute; left: 2%; top: 21%; width: 7px; height: 7px;
  background: #171a12; box-shadow: 9px 0 #171a12, 0 9px #171a12; opacity: .72;
}
.dashboard-logo-3d > img,
.dashboard-logo-3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }
.dashboard-logo-3d > img { inset: 25%; width: 50%; height: 50%; border-radius: 18%; opacity: .94; }
.dashboard-logo-3d > canvas { z-index: 1; opacity: 0; }
.dashboard-logo-3d.is-ready > img { opacity: 0; }
.dashboard-logo-3d.is-ready > canvas { opacity: 1; }
@keyframes dashboard-logo-orbit { to { transform: rotate(360deg); } }
.gravity-proof { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 27px; }
.gravity-proof > span { padding: 6px 9px; border: 1px solid #171a124f; border-radius: 999px; color: #27320f; background: #f0ff9d4d; font: 8px var(--mono); letter-spacing: .07em; text-transform: uppercase; }

.dashboard-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 29px; }
.dashboard-shortcuts > a { position: relative; min-height: 88px; display: grid; grid-template-columns: 43px minmax(0, 1fr) 22px; align-items: center; gap: 12px; padding: 14px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px 17px 8px 17px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); color: var(--text); box-shadow: 3px 3px 0 var(--line-soft); transition: transform .18s, border-color .18s, box-shadow .18s, background-color .18s; }
.dashboard-shortcuts > a:nth-child(even) { border-radius: 8px 17px 17px 17px; }
.dashboard-shortcuts > a::after { content: ''; position: absolute; right: -18px; bottom: -23px; width: 60px; height: 60px; border: 1px solid var(--brand-dim); border-radius: 50%; opacity: .35; }
.dashboard-shortcuts > a:hover { color: var(--text-strong); border-color: var(--brand-dim); text-decoration: none; transform: translateY(-3px); box-shadow: 5px 6px 0 var(--line-soft); }
.shortcut-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--brand-dim); border-radius: 13px 5px 13px 13px; background: #ccff0010; color: var(--brand); }
.shortcut-icon .nav-icon { width: 20px; height: 20px; }
.dashboard-shortcuts strong, .dashboard-shortcuts small { display: block; }
.dashboard-shortcuts strong { color: var(--text-strong); font-size: 12px; font-weight: 650; }
.dashboard-shortcuts small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.dashboard-shortcuts b { position: relative; z-index: 1; color: var(--brand); font-size: 17px; font-weight: 400; transition: transform .18s; }
.dashboard-shortcuts a:hover b { transform: translate(2px, -2px); }

.dashboard-section-kicker { margin-top: 0; }
.overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 25px; }
.overview-stats .dashboard-stat { min-height: 154px; display: flex; flex-direction: column; justify-content: flex-end; padding: 21px 22px; overflow: hidden; border-radius: 20px 8px 20px 20px; box-shadow: 3px 3px 0 var(--line-soft); transition: transform .18s, border-color .18s, box-shadow .18s; }
.overview-stats .dashboard-stat:nth-child(even) { border-radius: 8px 20px 20px 20px; }
.overview-stats .dashboard-stat:first-child,
.overview-stats .dashboard-stat:last-child { grid-column: span 2; }
.overview-stats .dashboard-stat::after { content: none; }
.overview-stats .dashboard-stat::before { content: ''; position: absolute; right: 17px; top: 18px; width: 8px; height: 8px; border: 1px solid var(--brand); box-shadow: 10px 0 0 -1px var(--brand), 0 10px 0 -1px var(--brand); opacity: .55; }
.overview-stats .dashboard-stat:hover { border-color: var(--brand-dim); transform: translateY(-3px); box-shadow: 5px 6px 0 var(--line-soft); }
.dashboard-stat-head { position: absolute; top: 17px; left: 20px; display: flex; align-items: center; gap: 10px; color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.dashboard-stat-head > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--brand); font-size: 8px; }
.overview-stats .dashboard-stat .v { margin-top: 40px; font-size: clamp(29px, 3vw, 42px); font-weight: 650; letter-spacing: -1.6px; }
.overview-stats .dashboard-stat .d { margin-top: 7px; font-size: 10px; }
.overview-stats .dashboard-stat.is-featured { background: #ccff00; border-color: #ccff00; box-shadow: 4px 4px 0 #516313; }
.overview-stats .dashboard-stat.is-featured .dashboard-stat-head { color: #3e4d08; }
.overview-stats .dashboard-stat.is-featured .dashboard-stat-head > span:first-child { color: #171a12; border-color: #171a1266; }
.overview-stats .dashboard-stat.is-featured .v { color: #171a12; font-size: clamp(38px, 4vw, 54px); }
.overview-stats .dashboard-stat.is-featured .d { color: #34410d; }
.overview-stats .dashboard-stat.is-featured::before { border-color: #171a12; box-shadow: 10px 0 0 -1px #171a12, 0 10px 0 -1px #171a12; }
.overview-stats .dashboard-stat:last-child { background: radial-gradient(circle at 85% 15%, #ccff0012, transparent 35%), var(--panel); border-color: var(--brand-dim); }

.dashboard-markets { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 18px; margin-bottom: 20px; }
.dashboard-side-rail { display: grid; gap: 16px; align-content: start; }
.dashboard-primary-panel,
.dashboard-secondary-panel,
.dashboard-orders-panel { border-radius: 20px 8px 20px 20px; box-shadow: 3px 3px 0 var(--line-soft); }
.dashboard-primary-panel { min-height: 480px; }
.dashboard-primary-panel .table-wrap { flex: 1; background-image: linear-gradient(#8b957c08 1px, transparent 1px), linear-gradient(90deg, #8b957c08 1px, transparent 1px); background-size: 34px 34px; }
.dashboard-panel-head { min-height: 70px; padding: 14px 18px; }
.dashboard-panel-title > span { display: block; margin-bottom: 3px; color: var(--muted-2); font: 7px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.dashboard-panel-head .dashboard-panel-title h2,
.dashboard-panel-head .dashboard-panel-title h3 { color: var(--text-strong); font: 650 14px var(--sans); letter-spacing: -.2px; text-transform: none; }
.dashboard-primary-panel table.dt tbody td { height: 46px; }
.dashboard-primary-panel table.dt tbody tr { transition: background-color .15s, transform .15s; }
.dashboard-primary-panel table.dt tbody tr:not(.is-empty):hover { transform: translateX(2px); }
.dashboard-primary-panel table.dt .btn { border-radius: 999px; }
.dashboard-primary-panel .panel-foot { min-height: 46px; }
.dashboard-panel-link { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; color: var(--brand); font-weight: 600; }
.dashboard-panel-link > span { font-size: 16px; transition: transform .18s; }
.dashboard-panel-link:hover > span { transform: translateX(3px); }

.nav-system-status {
  position: relative; flex: 0 0 auto; display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: 0; margin: 12px 1px 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px 8px 14px 8px;
  background: var(--bg-sunk); font-family: var(--mono);
}
.nav-system-status::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--brand); opacity: .85; }
.nav-system-status-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding: 10px 9px 7px; border-bottom: 1px solid var(--line-soft); color: var(--text-strong); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.nav-system-status-head .pulse { width: 5px; height: 5px; }
.nav-system-metric { min-width: 0; padding: 9px 8px 10px; border-left: 1px solid var(--line-soft); }
.nav-system-metric:nth-of-type(1) { border-left: 0; }
.nav-system-status small,
.nav-system-status strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-system-status small { color: var(--muted-2); font-size: 6px; line-height: 1; letter-spacing: .1em; text-transform: uppercase; }
.nav-system-status strong { margin-top: 5px; color: var(--text-strong); font-size: 8px; font-weight: 600; line-height: 1; }
.nav-system-metric:first-of-type strong { color: var(--brand); }

.dashboard-network-card { position: relative; overflow: hidden; border-radius: 24px 8px 24px 24px; background: radial-gradient(circle at 86% 8%, #ccff0014, transparent 31%), var(--panel); box-shadow: 3px 3px 0 var(--line-soft); }
.dashboard-network-card::after { content: ''; position: absolute; right: -48px; top: 66px; width: 130px; height: 48px; border: 1px solid var(--brand-dim); border-radius: 50%; transform: rotate(-28deg); opacity: .35; pointer-events: none; }
.dashboard-network-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 0; color: var(--muted); font-size: 10px; }
.dashboard-network-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 17px; padding: 20px 18px 22px; }
.network-orbit { position: relative; width: 69px; height: 69px; flex: 0 0 69px; display: grid; place-items: center; border: 1px solid var(--brand-dim); border-radius: 50%; }
.network-orbit::before { content: ''; position: absolute; width: 82px; height: 31px; border: 1px solid var(--brand); border-radius: 50%; transform: rotate(-31deg); }
.network-orbit::after { content: '✳'; color: var(--brand); font-size: 25px; line-height: 1; }
.network-orbit i { position: absolute; right: -8px; top: 7px; width: 8px; height: 8px; border: 2px solid var(--panel); border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-dim); }
.dashboard-network-main small,
.dashboard-network-main span { display: block; color: var(--muted); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.dashboard-network-main strong { display: block; max-width: 185px; margin: 3px 0 5px; overflow: hidden; color: var(--text-strong); font-size: 17px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-network-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.dashboard-network-grid > div { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.dashboard-network-grid > div:nth-child(even) { border-right: 0; }
.dashboard-network-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.dashboard-network-grid span { display: block; color: var(--muted-2); font: 8px var(--mono); text-transform: uppercase; }
.dashboard-network-grid strong { display: block; margin-top: 4px; overflow: hidden; color: var(--text-strong); font: 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.dashboard-movers-card { border-radius: 8px 20px 20px 20px; box-shadow: 3px 3px 0 var(--line-soft); }
.dashboard-mover-label { padding: 9px 12px 6px; font: 8px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.dashboard-mover-label.is-up { color: var(--up); }
.dashboard-mover-label.is-down { color: var(--down); }
.dashboard-mover-row { grid-template-columns: minmax(0, 1fr) 88px 74px; min-height: 42px; padding-inline: 12px; }
.dashboard-mover-row .venue a { color: var(--text-strong); font-weight: 650; }

.dashboard-depth-grid { grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 18px; margin-bottom: 20px; }
.dashboard-secondary-panel { min-height: 340px; }
.dashboard-fee-panel .panel-body { display: grid; align-items: center; min-height: 235px; }
.dashboard-orders-panel { margin-bottom: 4px; }
.dashboard-orders-panel table.dt tbody td { height: 46px; }

html[data-dogma-theme="lime"] .dashboard-page .gravity-banner { box-shadow: 8px 8px 0 #11150a; }
html[data-dogma-theme="lime"] .dashboard-shortcuts > a { box-shadow: 3px 3px 0 #718711; }
html[data-dogma-theme="lime"] .shortcut-icon { background: #11150a; color: #ccff00; border-color: #11150a; }
html[data-dogma-theme="lime"] .dashboard-shortcuts b { color: #11150a; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured { background: #11150a; border-color: #11150a; box-shadow: 4px 4px 0 #708711; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured .dashboard-stat-head { color: #a8c82b; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured .dashboard-stat-head > span:first-child { color: #ccff00; border-color: #ccff0066; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured .v { color: #f0ffae; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured .d { color: #bad94a; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat.is-featured::before { border-color: #ccff00; box-shadow: 10px 0 0 -1px #ccff00, 0 10px 0 -1px #ccff00; }
html[data-dogma-theme="lime"] .overview-stats .dashboard-stat:last-child { background: radial-gradient(circle at 85% 15%, #11150a10, transparent 35%), var(--panel); }
html[data-dogma-theme="lime"] .network-orbit i { border-color: var(--panel); }
html[data-dogma-theme="lime"] .dashboard-primary-panel .table-wrap { background-image: linear-gradient(#11150a08 1px, transparent 1px), linear-gradient(90deg, #11150a08 1px, transparent 1px); }
html[data-dogma-theme="lime"] .nav-system-status { background: #11150a; border-color: #11150a; }
html[data-dogma-theme="lime"] .nav-system-status-head,
html[data-dogma-theme="lime"] .nav-system-status strong { color: #f0ffae; }
html[data-dogma-theme="lime"] .nav-system-metric:first-of-type strong { color: #ccff00; }

@media (max-width: 1200px) {
  .dashboard-markets { grid-template-columns: minmax(0, 1fr); }
  .dashboard-side-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-depth-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .dashboard-page .gravity-banner { min-height: 300px; border-radius: 22px 22px 52px 22px; }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-side-rail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body[data-page="dashboard"] > main.shell { padding-top: 19px; }
  .dashboard-page-head { align-items: flex-start; }
  .dashboard-page-head .btn-group { width: 100%; }
  .dashboard-page-head .btn-group .btn { flex: 1; }
  .dashboard-page .gravity-banner { min-height: 0; padding: 28px 23px 34px; border-radius: 18px 18px 38px 18px; box-shadow: 4px 4px 0 #526515; }
  .dashboard-page .gravity-copy h2 { font-size: 40px; }
  .dashboard-logo-3d { width: min(62%, 185px); top: 44%; }
  .gravity-proof { margin-top: 22px; }
  .gravity-proof > span { font-size: 7px; }
  .dashboard-shortcuts { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .dashboard-shortcuts > a { min-height: 76px; }
  .overview-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .overview-stats .dashboard-stat:first-child,
  .overview-stats .dashboard-stat:last-child { grid-column: span 1; }
  .overview-stats .dashboard-stat { min-height: 140px; }
  .dashboard-panel-head { min-height: 64px; }
  .dashboard-primary-panel,
  .dashboard-secondary-panel,
  .dashboard-orders-panel { border-radius: 15px 6px 15px 15px; }
  .dashboard-network-main strong { max-width: 180px; }
  .dashboard-mover-row { grid-template-columns: minmax(0, 1fr) 78px 68px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .nav, .nav-toggle, .gravity-art, .skip-link, .theme-tabs { display: none !important; }
  body > main.shell, .foot, .tape, .maintenance-banner { margin-left: 0; }
}

/* ==========================================================================
   LANDING VISUAL SYSTEM / APPLICATION SHELL
   Carries the poster typography, lime grid, paper cards, heavy ink outlines,
   asymmetric corners and pixel details from index.php into every desk page.
   ========================================================================== */
:root {
  --display: "Arial Black", Impact, Haettenschweiler, "Helvetica Neue", Arial, sans-serif;
  --poster-ink: #11150a;
  --poster-paper: #f6f8f1;
  --poster-depth: #080a06;
  --poster-grid: #ccff000b;
  --poster-radius: 24px 24px 8px 24px;
  --poster-shadow: 4px 5px 0 var(--poster-depth);
}

html[data-dogma-theme="lime"] {
  --panel: #f6f8f1;
  --panel-2: #edf3df;
  --panel-3: #e2ebcc;
  --hover: #ffffff;
  --line: #9aaa62;
  --line-soft: #cbd5af;
  --line-strong: #11150a;
  --text: #303a1e;
  --text-strong: #11150a;
  --muted: #5a6842;
  --muted-2: #718055;
  --brand: #11150a;
  --brand-dim: #718b00;
  --poster-depth: #718b00;
  --poster-grid: #11150a12;
  --shadow: 0 22px 70px #52650038;
  --shadow-sm: 0 6px 20px #52650028;
}

body.dogma-terminal {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--poster-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--poster-grid) 1px, transparent 1px);
  background-size: 56px 56px;
}

body.dogma-terminal::before {
  content: '';
  position: fixed;
  z-index: -1;
  top: 88px;
  right: -180px;
  width: 680px;
  height: 520px;
  pointer-events: none;
  background: radial-gradient(ellipse, #ccff0012, transparent 68%);
}

html[data-dogma-theme="lime"] body.dogma-terminal::before {
  background: radial-gradient(ellipse, #f5ffafc4, transparent 68%);
}

/* Header and navigation */
.masthead {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--poster-depth) 28%, transparent);
}

.masthead-bar { padding-inline: 18px 24px; }

.masthead-bar > .brand {
  position: relative;
  width: calc(var(--sidebar-w) - 18px);
  min-height: 56px;
  padding: 7px 14px 7px 7px;
  border: 1.5px solid var(--poster-ink);
  border-radius: 23px;
  background: var(--poster-paper);
  box-shadow: 3px 4px 0 var(--poster-ink);
  color: var(--poster-ink);
}

.masthead-bar > .brand .brand-logo { width: 39px; height: 39px; }
.masthead-bar > .brand .brand-name { color: var(--poster-ink); font-family: var(--display); font-size: 18px; letter-spacing: -1px; }
.masthead-bar > .brand .brand-name > span { font-family: var(--sans); font-weight: 900; letter-spacing: 4.5px; }
.header-location { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.header-location strong { color: var(--text-strong); font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none; }

.theme-tabs { padding: 4px; border-radius: 999px; box-shadow: 2px 3px 0 var(--poster-depth); }
.theme-tabs button { min-height: 30px; padding-inline: 10px; border-radius: 999px; font-weight: 800; }
.btn-connect, .wallet-chip { border-radius: 999px; box-shadow: 2px 3px 0 var(--poster-depth); }
.btn-connect:hover, .wallet-chip:hover { transform: translateY(-1px); box-shadow: 1px 2px 0 var(--poster-depth); }

.nav {
  padding: 16px 13px 22px;
  border-right: 1px solid var(--line-strong);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--poster-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--poster-grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

.nav-heading { color: var(--muted-2); font-weight: 800; }
.nav > a { border-radius: 13px 13px 5px 13px; font-weight: 700; }
.nav > a:hover { border-color: var(--line); text-decoration: none; transform: translateX(2px); }
.nav > a.is-active { box-shadow: 3px 3px 0 var(--poster-depth); transform: translate(-1px, -1px); }
.sidebar-toggle { border-radius: 13px 13px 5px 13px; font-family: var(--mono); font-weight: 700; }
.nav-orbit { border-radius: 20px 7px 20px 20px; box-shadow: 3px 4px 0 var(--poster-depth); transform: rotate(-1deg); }
.nav-orbit > strong { font-family: var(--display); text-transform: uppercase; }
.nav-system-status { border-radius: 16px 5px 16px 16px; box-shadow: 3px 3px 0 var(--poster-depth); }

/* Page introductions */
body > main.shell { position: relative; padding: 34px; }
.page-head {
  position: relative;
  min-height: 124px;
  align-items: center;
  flex-wrap: wrap;
  padding: 25px 28px;
  overflow: hidden;
  border: 1.5px solid var(--line-strong);
  border-radius: 31px 31px 10px 31px;
  background:
    radial-gradient(circle at 92% 8%, #ccff0014, transparent 31%),
    var(--panel);
  box-shadow: 7px 8px 0 var(--poster-depth);
}

.page-head::after {
  content: '';
  position: absolute;
  right: 19px;
  bottom: 17px;
  width: 5px;
  height: 5px;
  background: var(--brand);
  box-shadow: 7px 0 var(--brand), 14px 0 var(--brand), 21px 0 var(--brand), 0 7px var(--brand), 21px 7px var(--brand), 7px 14px var(--brand), 14px 14px var(--brand);
  opacity: .35;
  pointer-events: none;
}

.page-title { position: relative; z-index: 1; }
.page-title .eyebrow,
.page-head > .eyebrow {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 800;
}
.page-title h1,
.connect-gate h1 {
  font-family: var(--display);
  font-size: clamp(34px, 3.2vw, 49px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.page-title p { margin-top: 10px; color: var(--muted); font-weight: 600; }
.page-head > .btn-group { position: relative; z-index: 1; }

/* Shared cards, data and controls */
.panel,
.stat {
  border: 1px solid var(--line);
  border-radius: var(--poster-radius);
  background: var(--panel);
  box-shadow: var(--poster-shadow);
}
.grid > .panel:nth-child(even),
.grid > .stat:nth-child(even) { border-radius: 8px 24px 24px 24px; }
.panel { overflow: clip; }
.panel-head {
  min-height: 58px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 74%, transparent);
}
.panel-head h2,
.panel-head h3,
.section-kicker h2 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.panel-head h2, .panel-head h3 { font-size: 13px; }
.panel-foot { border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.stat { min-height: 132px; padding: 21px; }
.stat .k { font: 800 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.stat .v { font-family: var(--display); font-weight: 900; }

.table-wrap { background: var(--panel); }
table.dt thead th {
  padding-block: 13px;
  background: var(--panel-2);
  color: var(--muted);
  font: 800 8px var(--mono);
  letter-spacing: .11em;
}
table.dt tbody tr { transition: background-color .15s ease; }
table.dt tbody tr:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
table.dt tbody td { border-color: var(--line-soft); }

.btn, .btn-connect {
  border-radius: 999px;
  font-weight: 800;
}
.btn:not(.btn-icon) { padding-inline: 17px; }
.btn:hover { transform: translateY(-2px); box-shadow: 2px 3px 0 var(--poster-depth); text-decoration: none; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { box-shadow: 2px 3px 0 var(--poster-depth); }
.chip { border-radius: 999px; font-weight: 800; }
.seg { padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.seg button { border: 0; border-radius: 999px; }
.tabs { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.tabs button, .tabs a { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 800; }
.tabs button.is-on, .tabs a.is-on { background: var(--brand); color: var(--bg); }
input[type=text], input[type=number], input[type=email], input[type=search], input[type=url], select, textarea {
  min-height: 44px;
  border-width: 1.5px;
  border-radius: 14px 14px 5px 14px;
  background-color: var(--panel-2);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.amount-field { border: 1px solid var(--line); border-radius: 19px 19px 7px 19px; background: var(--panel-2); }
.notice { border: 1px solid var(--line); border-left-width: 5px; border-radius: 17px 17px 6px 17px; background: var(--panel); box-shadow: 3px 4px 0 var(--poster-depth); }
.tag { border-radius: 999px; font-weight: 800; text-transform: uppercase; }
.quote-lines .ql.is-total { border-radius: 10px 10px 3px 10px; }

/* Overlays, identity, empty states and footer */
.modal { border: 1.5px solid var(--line-strong); border-radius: 28px 9px 28px 28px; box-shadow: 8px 9px 0 var(--poster-depth), var(--shadow); }
.modal-head { background: var(--panel-2); }
.modal-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; }
.modal-close { border-radius: 50%; }
.wallet-menu { border: 1.5px solid var(--line-strong); border-radius: 24px 7px 24px 24px; box-shadow: 6px 7px 0 var(--poster-depth), var(--shadow); }
.profile-avatar { border: 1.5px solid var(--line-strong); border-radius: 20px 7px 20px 20px; background: var(--brand); color: var(--bg); box-shadow: 3px 4px 0 var(--poster-depth); }
.connect-gate { border-radius: 34px 34px 11px 34px; background: radial-gradient(ellipse at 50% 18%, #ccff0018, transparent 52%), var(--panel); }
.chart-empty { background-size: 34px 34px; }
.tape { border-bottom: 1px solid var(--line-strong); box-shadow: 0 3px 0 color-mix(in srgb, var(--poster-depth) 24%, transparent); }
.tape-label { font-family: var(--display); letter-spacing: -.02em; }
.foot { margin-top: 46px; border-top: 1px solid var(--line-strong); background: var(--bg-sunk); }
.foot .brand-name,
.foot h4 { font-family: var(--display); font-weight: 900; text-transform: uppercase; }

html[data-dogma-theme="lime"] .masthead { background: #ccff00f4; }
html[data-dogma-theme="lime"] .page-head { background: radial-gradient(circle at 92% 8%, #ccff0066, transparent 31%), var(--poster-paper); }
html[data-dogma-theme="lime"] .panel,
html[data-dogma-theme="lime"] .stat,
html[data-dogma-theme="lime"] .table-wrap { background-color: var(--poster-paper); }
html[data-dogma-theme="lime"] table.dt thead th,
html[data-dogma-theme="lime"] .panel-head,
html[data-dogma-theme="lime"] .panel-foot { background: #edf3df; }
html[data-dogma-theme="lime"] input[type=text],
html[data-dogma-theme="lime"] input[type=number],
html[data-dogma-theme="lime"] input[type=email],
html[data-dogma-theme="lime"] input[type=search],
html[data-dogma-theme="lime"] input[type=url],
html[data-dogma-theme="lime"] select,
html[data-dogma-theme="lime"] textarea { background-color: #fbfff4; }
html[data-dogma-theme="lime"] .notice { background: var(--poster-paper); }
html[data-dogma-theme="lime"] .tabs button.is-on,
html[data-dogma-theme="lime"] .tabs a.is-on { background: var(--poster-ink); color: #ccff00; }
html[data-dogma-theme="lime"] .foot { background: #11150a; color: #dce6c4; }
html[data-dogma-theme="lime"] .foot .brand-name,
html[data-dogma-theme="lime"] .foot h4 { color: #f6f8f1; }

@media (min-width: 801px) {
  body.nav-collapsed .masthead-bar > .brand { width: 52px; min-width: 52px; padding: 5px; border-radius: 17px; }
  body.nav-collapsed .masthead-bar > .brand .brand-logo { width: 38px; height: 38px; }
}

@media (max-width: 800px) {
  .masthead-bar > .brand { width: auto; min-height: 51px; padding: 6px 11px 6px 6px; }
  .nav { background-color: var(--bg); }
  body > main.shell { padding: 28px 18px; }
  .page-head { min-height: 0; padding: 22px; border-radius: 24px 24px 8px 24px; box-shadow: 5px 6px 0 var(--poster-depth); }
}

@media (max-width: 600px) {
  .masthead-bar { padding-inline: 12px; }
  .masthead-bar > .brand { min-width: 51px; width: 51px; padding: 5px; border-radius: 17px; }
  .masthead-bar > .brand .brand-logo { width: 39px; height: 39px; }
  body > main.shell { padding: 23px 13px; }
  .page-head { padding: 20px 18px 22px; margin-bottom: 26px; }
  .page-head::after { right: 15px; bottom: 13px; }
  .page-title h1, .connect-gate h1 { font-size: clamp(29px, 10vw, 39px); }
  .page-head > .btn-group { width: 100%; }
  .page-head > .btn-group .btn { flex: 1; }
  .panel, .stat { border-radius: 19px 19px 6px 19px; box-shadow: 3px 4px 0 var(--poster-depth); }
  .grid > .panel:nth-child(even), .grid > .stat:nth-child(even) { border-radius: 6px 19px 19px 19px; }
  .panel-head { min-height: 54px; }
  .tabs { border-radius: 18px 18px 6px 18px; }
  .tabs button, .tabs a { flex: 1 0 auto; }
  .foot { margin-top: 30px; }
}

/* Documentation workspace */
body[data-page="docs"] > main.shell { padding-bottom: 56px; }
body[data-page="docs"] .page-head {
  margin-bottom: 22px;
  background:
    radial-gradient(circle at 88% 15%, #ccff0020, transparent 27%),
    linear-gradient(135deg, var(--panel), var(--panel-2));
}
body[data-page="docs"] .page-title { max-width: 760px; }
body[data-page="docs"] .page-title h1 { font-size: clamp(44px, 5vw, 74px); }

.docs-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0 0 24px;
}
.docs-pulse-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 18px 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px 19px 6px 19px;
  background: var(--panel);
  box-shadow: 3px 4px 0 var(--poster-depth);
}
.docs-pulse-card:nth-child(even) { border-radius: 6px 19px 19px 19px; }
.docs-pulse-card::after {
  content: '↗';
  position: absolute;
  right: 16px;
  top: 13px;
  color: var(--brand);
  font-size: 18px;
}
.docs-pulse-card > span {
  display: block;
  padding-right: 24px;
  color: var(--muted);
  font: 800 8px var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.docs-pulse-card > strong {
  display: block;
  margin: 10px 0 3px;
  overflow: hidden;
  color: var(--text-strong);
  font: 900 clamp(20px, 2vw, 28px)/1 var(--display);
  letter-spacing: -.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.docs-pulse-card > small { display: block; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.docs-pulse-card.is-ink { background: var(--brand); border-color: var(--brand); }
.docs-pulse-card.is-ink > span,
.docs-pulse-card.is-ink > small { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.docs-pulse-card.is-ink > strong,
.docs-pulse-card.is-ink::after { color: var(--bg); }

.docs-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(560px, 1fr) minmax(250px, 290px);
  align-items: start;
  gap: 22px;
}
.docs-toc { position: sticky; top: 102px; grid-column: 1; max-height: calc(100dvh - 124px); }
.docs-toc .panel-head { justify-content: space-between; }
.docs-toc .panel-body { padding: 9px; overflow-y: auto; }
.docs-toc ul { margin: 0; padding: 0; list-style: none; }
.docs-toc li + li { margin-top: 2px; }
.docs-toc a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 11px 11px 4px 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.docs-toc a > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
  font: 8px var(--mono);
}
.docs-toc a:hover {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text-strong);
  text-decoration: none;
  transform: translateX(2px);
}
.docs-toc a:hover > span { border-color: var(--brand); background: var(--brand); color: var(--bg); }
.docs-toc a.is-current { border-color: var(--brand-dim); background: var(--brand); color: var(--bg); }
.docs-toc a.is-current > span { border-color: color-mix(in srgb, var(--bg) 35%, transparent); color: var(--bg); }

.docs-article { grid-column: 2; min-width: 0; }
.docs-article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font: 800 8px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.docs-article-head strong { color: var(--text-strong); }
.docs-article-label { min-width: 0; }
.docs-article-label > span { display: block; color: var(--muted-2); font-size: 7px; }
.docs-article-label > strong { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-reading-progress { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.docs-reading-progress > span { min-width: 29px; color: var(--brand); text-align: right; }
.docs-reading-progress > i { display: block; width: 76px; height: 5px; overflow: hidden; border-radius: 999px; background: var(--line); }
.docs-reading-progress > i > b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .15s linear; }
.docs-prose {
  max-width: none;
  padding: clamp(28px, 3vw, 48px);
  counter-reset: docs-section;
  font-size: 14px;
  line-height: 1.82;
}
.docs-prose > h2 {
  counter-increment: docs-section;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  scroll-margin-top: 112px;
  margin: 58px 0 22px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--text-strong);
  font: 900 clamp(22px, 2.1vw, 31px)/1.05 var(--display);
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.docs-prose > h2:first-child { margin-top: 0; }
.docs-prose > h2::before {
  content: counter(docs-section, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--brand-dim);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--brand);
  font: 800 9px var(--mono);
  letter-spacing: .05em;
}
.docs-prose > h3 {
  margin: 34px 0 13px;
  color: var(--text-strong);
  font: 900 16px/1.2 var(--display);
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.docs-prose > h3::before { content: '✳'; margin-right: 9px; color: var(--brand); }
.docs-prose p { max-width: none; margin-bottom: 17px; color: var(--text); }
.docs-prose > h2 + p { color: var(--text-strong); font-size: 15px; font-weight: 650; }
.docs-prose ul,
.docs-prose ol {
  margin: 0 0 22px;
  padding: 17px 20px 17px 40px;
  border: 1px solid var(--line-soft);
  border-radius: 17px 17px 6px 17px;
  background: var(--panel-2);
}
.docs-prose li { margin-bottom: 9px; padding-left: 4px; }
.docs-prose li:last-child { margin-bottom: 0; }
.docs-prose li::marker { color: var(--brand); font-family: var(--mono); font-weight: 800; }
.docs-prose code { border-radius: 999px; background: var(--panel-2); color: var(--brand); }
.docs-prose pre {
  position: relative;
  margin: 22px 0 25px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 20px 7px 20px 20px;
  background: var(--bg-sunk);
  box-shadow: 4px 5px 0 var(--poster-depth);
}
.docs-prose pre::before {
  content: 'CODE';
  display: block;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 8px;
  border: 1px solid var(--brand-dim);
  border-radius: 999px;
  color: var(--brand);
  font: 800 7px var(--mono);
  letter-spacing: .12em;
}
.docs-prose pre code {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  white-space: pre;
}
.docs-prose blockquote {
  position: relative;
  margin: 23px 0 28px;
  padding: 23px 25px 23px 29px;
  border: 1px solid var(--brand-dim);
  border-left: 6px solid var(--brand);
  border-radius: 5px 19px 19px 19px;
  background: radial-gradient(circle at 96% 0, #ccff0014, transparent 38%), var(--panel-2);
  color: var(--text);
}
.docs-prose table.dt {
  width: 100%;
  margin: 22px 0 26px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.docs-prose table.dt th,
.docs-prose table.dt td { white-space: normal; }
.docs-ending { margin-bottom: 0 !important; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--muted) !important; }

.docs-context { position: sticky; top: 102px; grid-column: 3; display: grid; gap: 16px; }
.docs-context-card { padding: 21px; }
.docs-context-card > span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted-2);
  font: 800 8px var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.docs-context-card h2 { margin-bottom: 11px; font: 900 21px/1.05 var(--display); letter-spacing: -.045em; text-transform: uppercase; }
.docs-context-card p { color: var(--muted); font-size: 11px; line-height: 1.75; }
.docs-context-card > strong { display: block; margin-bottom: 11px; color: var(--text-strong); font: 900 21px/1.05 var(--display); letter-spacing: -.045em; text-transform: uppercase; }
.docs-context-card > a { display: flex; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 12px; border-top: 1px solid currentColor; color: inherit; font-size: 10px; font-weight: 800; }
.docs-context-card > a:hover { text-decoration: none; transform: translateX(2px); }
.docs-context-card.is-highlighted { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.docs-context-card.is-highlighted > span,
.docs-context-card.is-highlighted > strong,
.docs-context-card.is-highlighted > p,
.docs-context-card.is-highlighted > a { color: var(--bg); }
.docs-context-card.is-highlighted code { border-color: color-mix(in srgb, var(--bg) 25%, transparent); background: color-mix(in srgb, var(--bg) 10%, transparent); color: var(--bg); }
.docs-check-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.docs-check-list li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 9px; align-items: start; color: var(--text); font-size: 11px; line-height: 1.55; }
.docs-check-list li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--bg); font: 800 8px var(--mono); }
.docs-quick-links { display: grid; gap: 6px; }
.docs-quick-links a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px 11px 4px 11px; background: var(--panel-2); color: var(--text); font-size: 11px; font-weight: 750; }
.docs-quick-links a:hover { border-color: var(--brand-dim); background: var(--hover); color: var(--text-strong); text-decoration: none; transform: translateX(2px); }

html[data-dogma-theme="lime"] .docs-pulse-card.is-ink { background: var(--poster-ink); border-color: var(--poster-ink); }
html[data-dogma-theme="lime"] .docs-pulse-card.is-ink > span,
html[data-dogma-theme="lime"] .docs-pulse-card.is-ink > small { color: #b8ca82; }
html[data-dogma-theme="lime"] .docs-pulse-card.is-ink > strong,
html[data-dogma-theme="lime"] .docs-pulse-card.is-ink::after { color: #ccff00; }
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted { background: var(--poster-ink); border-color: var(--poster-ink); }
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted > span,
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted > strong,
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted > p,
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted > a { color: #ccff00; }
html[data-dogma-theme="lime"] .docs-context-card.is-highlighted code { border-color: #ccff0044; background: #ccff0010; color: #e8ff8c; }
html[data-dogma-theme="lime"] .docs-prose pre { background: #11150a; }
html[data-dogma-theme="lime"] .docs-prose pre code { color: #eef5dc; }

@media (max-width: 1550px) {
  .docs-workspace { grid-template-columns: minmax(200px, 225px) minmax(0, 1fr); }
  .docs-article { grid-column: 2; }
  .docs-context { position: static; grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .docs-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-workspace { grid-template-columns: minmax(0, 1fr); }
  .docs-toc, .docs-article, .docs-context { grid-column: 1; }
  .docs-toc { position: static; max-height: none; }
  .docs-toc ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 8px; }
  .docs-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body[data-page="docs"] .page-title h1 { font-size: clamp(38px, 12vw, 54px); }
  .docs-pulse-grid { gap: 9px; }
  .docs-pulse-card { min-height: 102px; padding: 15px; }
  .docs-pulse-card > strong { font-size: 20px; }
  .docs-toc ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-article-head { align-items: flex-start; flex-direction: column; }
  .docs-article-label > strong { white-space: normal; }
  .docs-reading-progress { width: 100%; }
  .docs-reading-progress > i { flex: 1; }
  .docs-prose { padding: 25px 21px 32px; font-size: 13px; }
  .docs-prose > h2 { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; margin-top: 45px; font-size: 22px; }
  .docs-prose > h2::before { width: 34px; height: 34px; }
  .docs-prose > h2 + p { font-size: 14px; }
  .docs-prose pre { padding: 20px 17px; }
  .docs-prose table.dt { display: block; overflow-x: auto; }
  .docs-prose table.dt th, .docs-prose table.dt td { min-width: 130px; }
  .docs-context { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .docs-pulse-grid { grid-template-columns: minmax(0, 1fr); }
  .docs-toc ul { grid-template-columns: minmax(0, 1fr); }
  .docs-toc a { min-height: 39px; }
}
