:root {
  --bg: #080b12;
  --bg-raised: #0d111b;
  --panel: #111722;
  --panel-2: #161d29;
  --panel-3: #1b2432;
  --ink: #f6f8fb;
  /* Seven rules reference --text, which was never defined, so those colour
     declarations were silently dropped and the element inherited instead.
     Aliased rather than removed, so the intent is explicit either way. */
  --text: #f6f8fb;
  /* Drives native checkbox, select, scrollbar and autofill rendering. The meta
     tag alone leaves the computed value "normal", so form controls on the
     wallet route were still drawn for a dark page. */
  color-scheme: light;
  --muted: #929dac;
  --muted-2: #647080;
  --line: #273140;
  --line-bright: #364459;
  --blue: #3f6df6;
  --blue-bright: #6f92ff;
  --green: #55dc9c;
  --green-dim: #183e32;
  --red: #ff6e7e;
  --red-dim: #412029;
  --amber: #f2b85b;
  --violet: #a78bfa;
  --shell: min(1440px, calc(100% - 48px));
  --radius: 14px;
  --radius-small: 9px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; max-width: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgb(63 109 246 / .07), transparent 28rem),
    radial-gradient(circle at 12% 74%, rgb(85 220 156 / .035), transparent 24rem),
    linear-gradient(rgb(255 255 255 / .018) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgb(255 255 255 / .018) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
code { font-family: var(--font-mono); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { text-wrap: balance; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-180%);
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--bg);
}
.skip-link:focus-visible { transform: translateY(0); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgb(54 68 89 / .72);
  background: rgb(8 11 18 / .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 36px rgb(60 50 30 / .12);
}
.header-shell {
  width: var(--shell);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  background: var(--panel);
}
.brand-copy { display: grid; gap: .05rem; }
.brand-copy strong { font-size: .94rem; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font: 600 .57rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .18rem;
}
.site-nav > a,
.nav-more > button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: .45rem .72rem;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 720;
  transition: color .16s ease, background .16s ease;
}
.site-nav > a:hover,
.nav-more > button:hover { color: var(--ink); background: var(--panel); }
.site-nav > a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }
.nav-more { position: relative; }
.more-menu,
.wallet-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .75rem);
  z-index: 120;
  min-width: 220px;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  padding: .45rem;
  background: var(--panel);
  box-shadow: 0 18px 60px rgb(60 50 30 / .12);
}
.more-menu a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 8px;
  padding: .72rem .75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .76rem;
}
.more-menu a:hover,
.more-menu a[aria-current="page"] { background: var(--panel-2); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: var(--muted);
  font: 650 .64rem var(--font-mono);
  text-transform: uppercase;
}
.live-indicator i,
.console-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgb(85 220 156 / .1);
}
.wallet-shell { position: relative; }
.wallet-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  padding: .55rem .85rem;
  background: var(--panel);
  color: var(--ink);
  font-size: .73rem;
  font-weight: 750;
  box-shadow: inset 0 1px rgb(255 255 255 / .025);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.wallet-trigger:hover,
.wallet-trigger[aria-expanded="true"] {
  border-color: var(--blue-bright);
  background: var(--panel-2);
  box-shadow: 0 0 0 3px rgb(63 109 246 / .1);
}
.wallet-chevron {
  color: var(--muted);
  font-size: .72rem;
  transition: transform .16s ease;
}
.wallet-trigger[aria-expanded="true"] .wallet-chevron { transform: rotate(180deg); }
.wallet-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.wallet-trigger.is-connected .wallet-dot { background: var(--green); }
.wallet-trigger.has-memory { border-color: var(--line-bright); background: var(--panel-2); }
.wallet-trigger.has-memory .wallet-dot { background: var(--blue-bright); box-shadow: 0 0 0 4px rgb(110 155 255 / .1); }
.wallet-menu {
  width: min(340px, calc(100vw - 28px));
  padding: .8rem;
  box-shadow: 0 24px 80px rgb(60 50 30 / .12), 0 0 0 1px rgb(255 255 255 / .025);
}
.wallet-menu-head {
  display: flex;
  justify-content: space-between;
  padding: .25rem .25rem .75rem;
  color: var(--muted);
  font: 650 .62rem var(--font-mono);
  text-transform: uppercase;
}
.wallet-menu-head b { color: var(--green); }
.wallet-account {
  display: flex;
  align-items: center;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .8rem;
  background: var(--bg-raised);
  box-shadow: inset 0 1px rgb(255 255 255 / .02);
}
.wallet-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--blue) 0 48%, transparent 49%),
    linear-gradient(315deg, var(--green) 0 48%, var(--panel-3) 49%);
}
.wallet-pair-link {
  height: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .55rem;
  padding: 0 1rem;
}
.wallet-pair-link span { height: 1px; background: var(--line); }
.wallet-pair-link b {
  color: var(--blue-bright);
  font: 700 .52rem var(--font-mono);
}
.wallet-deposit-account { margin-top: 0; }
.deposit-avatar {
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--violet) 0 48%, transparent 49%),
    linear-gradient(315deg, var(--blue-bright) 0 48%, var(--panel-3) 49%);
}
.wallet-pair-note {
  margin: .55rem .2rem 0;
  color: var(--muted-2);
  font-size: .61rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.wallet-account div { display: grid; min-width: 0; gap: .12rem; }
.wallet-account strong { overflow: hidden; text-overflow: ellipsis; font: 700 .76rem var(--font-mono); }
.wallet-account small { color: var(--muted); font-size: .65rem; }
.wallet-menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .55rem; }
.wallet-menu-actions button,
.wallet-menu-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-size: .68rem;
  font-weight: 700;
}
.wallet-menu-actions button:hover,
.wallet-menu-actions a:hover { border-color: var(--line-bright); background: var(--panel-2); }
.wallet-menu-actions button:disabled { color: var(--muted-2); opacity: .6; }
.wallet-menu-actions .danger-action { color: var(--red); }
.wallet-menu-actions .quiet-action { grid-column: 1 / -1; color: var(--muted); }
#wallet-shell-status { min-height: 1rem; margin: .7rem .2rem 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }

.nav-toggle {
  display: none;
  min-width: 68px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 750;
}
.nav-toggle i,
.nav-toggle i::before,
.nav-toggle i::after { width: 14px; height: 1px; display: block; background: currentColor; }
.nav-toggle i { position: relative; }
.nav-toggle i::before,
.nav-toggle i::after { content: ""; position: absolute; left: 0; }
.nav-toggle i::before { top: -5px; }
.nav-toggle i::after { top: 5px; }
.nav-toggle[aria-expanded="true"] i { background: transparent; }
.nav-toggle[aria-expanded="true"] i::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] i::after { top: 0; transform: rotate(-45deg); }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  padding: .75rem 1rem;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 780;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: var(--blue); background: var(--blue); color: white; }
.button-primary:hover { background: #4c77f7; border-color: #4c77f7; }
.button-secondary { background: var(--panel); color: var(--ink); }
.button-secondary:hover { border-color: var(--blue-bright); background: var(--panel-2); }
.full-button { width: 100%; }
.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}

.route-view { width: var(--shell); margin: 0 auto; }
.js .route-view:not(.is-active) { display: none; }
.route-view[hidden] { display: none !important; }
.route-view.is-active { animation: route-enter .2s ease-out; }
@keyframes route-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--blue-bright);
  font: 700 .67rem var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow span { display: inline-block; width: 18px; height: 1px; margin: 0 .55rem .18rem 0; background: currentColor; }
.home-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, .82fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  padding: 68px 0 82px;
}
.home-hero > *,
.hero-signal { min-width: 0; }
.hero-signal h1,
.route-header h1 {
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 6.8rem);
  line-height: .9;
  letter-spacing: -.072em;
}
.hero-signal h1 em { color: var(--green); font-style: normal; }
.lede {
  max-width: 720px;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.72;
  text-wrap: pretty;
}
.market-launcher {
  max-width: 720px;
  margin-top: 2.1rem;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  padding: .75rem;
  background: var(--panel);
  box-shadow: 0 18px 60px rgb(60 50 30 / .12);
}
.market-launcher > label {
  display: block;
  padding: .15rem .2rem .6rem;
  color: var(--muted);
  font: 650 .63rem var(--font-mono);
  text-transform: uppercase;
}
.market-launcher > div { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.market-launcher input {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem .9rem;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.market-launcher input:hover { border-color: var(--line-bright); }
.market-launcher input:focus-visible {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgb(63 109 246 / .12);
}
.market-launcher button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: .8rem 1rem;
  background: var(--green);
  color: #06110d;
  font-weight: 850;
  box-shadow: 0 8px 22px rgb(85 220 156 / .12);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.market-launcher button:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 12px 28px rgb(85 220 156 / .18); }
.market-launcher footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: .58rem .2rem 0;
}
.market-launcher footer p {
  margin: 0;
  color: var(--muted);
  font-size: .65rem;
}
.market-launcher footer a {
  flex: none;
  color: var(--blue-bright);
  font: 750 .64rem var(--font-mono);
}
.market-launcher footer a:hover { color: var(--text); }
.hero-guarantees {
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: .7rem;
}
.hero-guarantees li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .55rem;
  border: 1px solid rgb(39 49 64 / .78);
  border-radius: 9px;
  padding: .62rem .7rem;
  background: rgb(13 17 27 / .64);
}
.hero-guarantees b {
  color: var(--green);
  font: 700 .61rem var(--font-mono);
}
.hero-guarantees span { min-width: 0; line-height: 1.35; }

.execution-console {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 34px 100px rgb(60 50 30 / .12), 0 0 0 1px rgb(63 109 246 / .025);
}
.execution-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgb(255 255 255 / .025) 50%, transparent 50.2%),
    linear-gradient(transparent 0 49.8%, rgb(255 255 255 / .025) 50%, transparent 50.2%);
  background-size: 72px 72px;
}
.execution-console > * { position: relative; z-index: 1; }
.execution-console > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 1rem;
  color: var(--muted);
  font: 650 .62rem var(--font-mono);
  text-transform: uppercase;
}
.execution-console > header div { display: flex; align-items: center; gap: .55rem; }
.execution-console > header b { color: var(--green); }
.console-market { padding: 1.4rem 1.4rem .8rem; }
.console-market > span { color: var(--blue-bright); font: 650 .62rem var(--font-mono); text-transform: uppercase; }
.console-market h2 { margin: .65rem 0 0; max-width: 440px; font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.06; letter-spacing: -.04em; }
.position-summary {
  margin: 1rem 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  border: 1px solid #315c4b;
  border-radius: 12px;
  padding: 1rem;
  background: rgb(24 62 50 / .46);
}
.outcome-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 900;
}
.outcome-badge.yes { background: var(--green); color: #07120d; }
.position-summary div { display: grid; }
.position-summary strong { font-size: 1.35rem; }
.position-summary small { color: var(--muted); }
.position-summary > b { color: var(--green); font: 700 .68rem var(--font-mono); }
.execution-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.execution-metrics div { padding: .85rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.execution-metrics div:nth-child(even) { border-right: 0; }
.execution-metrics div:nth-last-child(-n+2) { border-bottom: 0; }
.execution-metrics dt { color: var(--muted); font: 650 .59rem var(--font-mono); text-transform: uppercase; }
.execution-metrics dd { margin: .32rem 0 0; font-size: .85rem; font-weight: 780; }
.proof-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
  margin: 1.4rem;
}
.proof-line li { position: relative; display: grid; gap: .18rem; color: var(--muted); font-size: .68rem; }
.proof-line li:not(:last-child)::after { content: ""; position: absolute; left: 55%; right: -45%; top: 4px; height: 1px; background: var(--green); }
.proof-line li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; margin-bottom: .35rem; background: var(--green); box-shadow: 0 0 0 4px rgb(85 220 156 / .09); }
.proof-line small { color: var(--green); font: 600 .55rem var(--font-mono); text-transform: uppercase; }
.execution-console > footer {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: .8rem 1.4rem;
}
.execution-console > footer div { min-width: 0; display: grid; gap: .2rem; }
.execution-console > footer span { color: var(--muted); font: 600 .58rem var(--font-mono); text-transform: uppercase; }
.execution-console > footer code { overflow: hidden; text-overflow: ellipsis; font-size: .68rem; }
.execution-console > footer a { flex: 0 0 auto; color: var(--green); text-decoration: none; font-size: .7rem; font-weight: 750; }

.market-desk,
.trust-architecture { padding: 110px 0; border-top: 1px solid var(--line); }
.section-heading h2,
.architecture-copy h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.057em;
}
.split-heading { display: grid; grid-template-columns: 1.25fr .75fr; gap: 4rem; align-items: end; }
.split-heading > p { margin: 0; color: var(--muted); line-height: 1.7; text-wrap: pretty; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3.5rem; }
.product-card {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.35rem;
  background: var(--panel);
  text-decoration: none;
  box-shadow: 0 18px 50px rgb(60 50 30 / .09);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--line-bright); background: var(--panel-2); box-shadow: 0 24px 70px rgb(60 50 30 / .12); }
.product-card.open-card:hover { border-color: var(--green); }
.product-card.close-card:hover { border-color: var(--red); }
.product-card.target-card:hover { border-color: var(--violet); }
.product-index { color: var(--muted); font: 700 .63rem var(--font-mono); }
.product-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 2.2rem 0 1.4rem; border: 1px solid var(--line-bright); border-radius: 14px; font-size: 1.4rem; }
.open-card .product-icon { color: var(--green); background: var(--green-dim); }
.close-card .product-icon { color: var(--red); background: var(--red-dim); }
.target-card .product-icon { color: var(--violet); background: rgb(91 75 138 / .12); }
.product-card h3 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.product-card > p { margin: .75rem 0 1.5rem; color: var(--muted); line-height: 1.65; text-wrap: pretty; }
.product-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: auto 0 1.3rem; border-top: 1px solid var(--line); }
.product-card dl div { padding-top: .85rem; }
.product-card dt { color: var(--muted-2); font: 600 .57rem var(--font-mono); text-transform: uppercase; }
.product-card dd { margin: .3rem 0 0; font-size: .72rem; font-weight: 750; }
.product-card > b { font-size: .72rem; }

.trust-architecture { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(3rem, 7vw, 8rem); align-items: center; }
.architecture-copy > p:not(.eyebrow) { max-width: 650px; color: var(--muted); line-height: 1.75; text-wrap: pretty; }
.architecture-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.boundary-stack { position: relative; display: grid; gap: .75rem; }
.boundary-stack::before { content: ""; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 1px; background: var(--line-bright); }
.boundary-stack article {
  position: relative;
  padding: 1.15rem 1.15rem 1.15rem 4.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.boundary-stack article::before { content: ""; position: absolute; left: 22px; top: 25px; width: 11px; height: 11px; border-radius: 50%; background: var(--blue-bright); box-shadow: 0 0 0 5px var(--panel); }
.boundary-stack span { color: var(--blue-bright); font: 650 .59rem var(--font-mono); text-transform: uppercase; }
.boundary-stack strong { display: block; margin-top: .35rem; }
.boundary-stack p { margin: .35rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }

.route-header {
  min-height: 270px;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  align-items: end;
  padding: 62px 0 46px;
  border-bottom: 1px solid var(--line);
}
.route-header > div:first-child { max-width: 920px; }
.route-header h1 { font-size: clamp(2.8rem, 5vw, 5.4rem); }
.route-header > div:first-child > p:last-child { max-width: 760px; margin: 1.25rem 0 0; color: var(--muted); line-height: 1.7; }
.route-price,
.assurance-chip {
  min-width: 210px;
  display: grid;
  gap: .3rem;
  border-left: 2px solid var(--green);
  padding: .25rem 0 .25rem 1rem;
}
.route-price span,
.assurance-chip span { color: var(--muted); font: 650 .59rem var(--font-mono); text-transform: uppercase; }
.route-price strong,
.assurance-chip strong { font-size: 1rem; }
.route-price small,
.assurance-chip small { color: var(--muted-2); font-size: .66rem; }

.journey-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.journey-progress li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .05rem .65rem;
  align-items: center;
  padding: .8rem 1rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
}
.journey-progress li:last-child { border-right: 0; }
.journey-progress li span { grid-row: 1 / 3; color: var(--muted-2); font: 700 .67rem var(--font-mono); }
.journey-progress li b { font-size: .75rem; }
.journey-progress li small { font-size: .61rem; }
.journey-progress li.is-current { background: var(--panel-3); color: var(--ink); }
.journey-progress li.is-current span { color: var(--green); }
.journey-progress li.is-done span { color: var(--green); }

.trade-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 1rem;
  align-items: start;
  padding-bottom: 110px;
}
.market-workspace,
.order-ticket,
.proof-inspector,
.portfolio-sidebar,
.portfolio-main,
.proof-explainer {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.market-workspace { overflow: hidden; }
.workspace-topline {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: .6rem 1rem;
  color: var(--muted);
  font: 650 .58rem var(--font-mono);
}
.workspace-topline b { color: var(--green); }
.market-search-form { padding: 1.25rem; }
.market-search-form > label,
.ticket-form > label,
.proof-form > label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .45rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}
.market-search-row { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: .78rem .85rem;
  background: var(--panel);
  color: var(--ink);
}
input::placeholder,
textarea::placeholder { color: #596474; }
input:hover,
textarea:hover,
select:hover { border-color: #4a5a70; }
input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--red); }
.market-search-help { display: flex; justify-content: space-between; gap: 1rem; margin-top: .55rem; }
.market-search-help p { margin: 0; color: var(--muted-2); font-size: .64rem; }
.market-search-help button { border: 0; padding: 0; background: transparent; color: var(--blue-bright); font-size: .64rem; }
.form-status { min-height: 1.15rem; margin: .65rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.field-error { color: var(--red); font-size: .64rem; }
.market-result { border-top: 1px solid var(--line); }
.market-title-row { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.25rem; }
.market-title-row span { color: var(--blue-bright); font: 650 .58rem var(--font-mono); }
.market-title-row h2 { margin: .45rem 0 0; max-width: 720px; font-size: 1.35rem; line-height: 1.25; }
.market-title-row > b { display: inline-flex; align-items: center; gap: .4rem; color: var(--green); font: 650 .59rem var(--font-mono); white-space: nowrap; }
.market-title-row > b i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.market-chart { position: relative; height: 180px; margin: 0 1.25rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.market-chart svg { width: 100%; height: 100%; }
.market-chart path { fill: none; stroke: var(--green); stroke-width: 2; vector-effect: non-scaling-stroke; }
.market-chart path.chart-fill { fill: rgb(85 220 156 / .07); stroke: none; }
.market-chart > span { position: absolute; left: 0; bottom: .6rem; color: var(--muted-2); font: 600 .55rem var(--font-mono); text-transform: uppercase; }
.market-quotes { display: grid; grid-template-columns: 1fr 1fr; padding: 1.25rem; gap: .75rem; }
.market-quotes > div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: .2rem; border: 1px solid var(--line); border-radius: 11px; padding: 1rem; background: var(--bg-raised); }
.market-quotes span { color: var(--muted); font: 750 .65rem var(--font-mono); }
.market-quotes strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 1.4rem; }
.market-quotes small { color: var(--muted-2); font-size: .61rem; }
.market-quotes > div:first-child strong { color: var(--green); }
.market-quotes > div:last-child strong { color: var(--red); }
.trade-principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.trade-principles div { padding: 1rem; border-right: 1px solid var(--line); }
.trade-principles div:last-child { border-right: 0; }
.trade-principles span { color: var(--blue-bright); font: 650 .58rem var(--font-mono); }
.trade-principles strong { display: block; margin-top: .45rem; font-size: .76rem; }
.trade-principles p { margin: .35rem 0 0; color: var(--muted); font-size: .66rem; line-height: 1.5; text-wrap: pretty; }

.order-ticket { position: sticky; top: 88px; overflow: hidden; }
.ticket-heading { min-height: 66px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: .8rem 1rem; }
.ticket-heading span { color: var(--muted); font: 650 .58rem var(--font-mono); }
.ticket-heading h2 { margin: .25rem 0 0; font-size: 1rem; }
.ticket-heading > b { border: 1px solid var(--line-bright); border-radius: 7px; padding: .38rem .52rem; color: var(--green); font: 700 .61rem var(--font-mono); }
.ticket-form { padding: 1rem; border-bottom: 1px solid var(--line); }
.ticket-form > input,
.ticket-form > textarea { margin-bottom: .45rem; }
.ticket-form label span { color: var(--muted-2); font-weight: 600; }
.field-help { margin: 0 0 .8rem; color: var(--muted-2); font-size: .62rem; line-height: 1.48; text-wrap: pretty; }
.outcome-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; border: 0; padding: 0; margin: 0 0 1rem; }
.outcome-selector legend { grid-column: 1 / -1; margin-bottom: .4rem; color: var(--muted); font-size: .68rem; font-weight: 700; }
.outcome-selector label { cursor: pointer; }
.outcome-selector input { position: absolute; opacity: 0; pointer-events: none; }
.outcome-selector label > span { min-height: 60px; display: grid; align-content: center; border: 1px solid var(--line); border-radius: 9px; padding: .6rem .75rem; background: var(--bg-raised); }
.outcome-selector label > span b { color: var(--muted); }
.outcome-selector label > span small { margin-top: .14rem; color: var(--muted-2); font-size: .56rem; }
.outcome-selector input:checked + span { border-color: var(--blue-bright); background: rgb(47 79 143 / .10); }
.outcome-selector #outcome-yes:checked + span b { color: var(--green); }
.outcome-selector #outcome-no:checked + span b { color: var(--red); }
.outcome-selector input:focus-visible + span { outline: 3px solid var(--blue-bright); outline-offset: 3px; }
.outcome-selector input:disabled + span { opacity: .45; cursor: not-allowed; }
.ticket-step-label { display: flex; justify-content: space-between; margin-bottom: .8rem; color: var(--muted); font: 650 .58rem var(--font-mono); }
.notice {
  display: grid;
  gap: .25rem;
  margin-bottom: .85rem;
  border: 1px solid rgb(138 90 0 / .32);
  border-radius: 9px;
  padding: .75rem;
  background: rgb(138 90 0 / .07);
  font-size: .67rem;
  line-height: 1.45;
}
.notice strong { color: var(--amber); }
.notice span { color: #5f5744; }
.notice a { color: var(--amber); text-decoration: none; font-weight: 750; }
.notice-safe { border-color: rgb(28 110 78 / .35); background: rgb(28 110 78 / .08); }
.notice-safe strong { color: var(--green); }
.notice-safe span { color: var(--muted); }
.compiled-card { min-height: 230px; }
.compiled-empty { min-height: 230px; display: grid; align-content: center; justify-items: center; padding: 1.5rem; text-align: center; }
.empty-orbit { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: .8rem; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--blue-bright); font-size: 1.2rem; }
.compiled-empty h3 { margin: 0; font-size: .95rem; }
.compiled-empty p { max-width: 310px; margin: .45rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }
#preview-result,
#compiled-result { padding: 1rem; }
.result-top { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font: 650 .57rem var(--font-mono); }
.result-top b { color: var(--green); text-align: right; }
.result-market { margin: .85rem 0 1rem; font-size: 1.02rem; line-height: 1.35; }
.result-order { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.result-order div { padding: .7rem; border-right: 1px solid var(--line); }
.result-order div:last-child { border-right: 0; }
.result-order small,
.exposure-panel small { display: block; color: var(--muted-2); font-size: .54rem; }
.result-order strong { display: block; margin-top: .3rem; font-size: .69rem; overflow-wrap: anywhere; }
.exposure-panel { display: grid; grid-template-columns: 1fr 1fr; margin: .7rem 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.exposure-panel div { padding: .65rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.exposure-panel div:nth-child(even) { border-right: 0; }
.exposure-panel div:nth-last-child(-n+2) { border-bottom: 0; }
.exposure-panel strong { display: block; margin-top: .24rem; font-size: .66rem; overflow-wrap: anywhere; }
.result-hash { display: grid; gap: .3rem; border: 1px solid var(--line); border-radius: 8px; padding: .65rem; }
.result-hash span { color: var(--muted); font: 600 .54rem var(--font-mono); }
.result-hash code { overflow-wrap: anywhere; font-size: .59rem; }
.quote-expiry { color: var(--amber); font: 650 .62rem var(--font-mono); }
.quote-expiry.is-expired { color: var(--red); }
.bounds-acknowledgement { display: grid; grid-template-columns: 20px 1fr; gap: .65rem; margin: .8rem 0; border: 1px solid var(--line-bright); border-radius: 8px; padding: .75rem; font-size: .66rem; line-height: 1.45; }
.bounds-acknowledgement input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.handoff-panel { border-top: 1px solid var(--line); padding-top: .8rem; }
.stage-heading span { color: var(--blue-bright); font: 650 .57rem var(--font-mono); text-transform: uppercase; }
.stage-heading h4 { margin: .35rem 0; }
.stage-heading p { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.48; }
.handoff-panel textarea { margin-top: .7rem; font: 600 .6rem var(--font-mono); }
.stage-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.handoff-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .7rem; }
.handoff-links a { color: var(--blue-bright); font-size: .61rem; }
.approval-warning { color: var(--amber); font-size: .61rem; line-height: 1.5; }

.portfolio-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  padding: 1.2rem 0 110px;
}
.portfolio-sidebar { padding: 1.2rem; }
.portfolio-sidebar > span,
.proof-explainer > span { color: var(--muted); font: 650 .59rem var(--font-mono); }
.portfolio-empty-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 3rem auto 1rem; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--blue-bright); font-size: 1.5rem; }
.portfolio-sidebar h2 { text-align: center; font-size: 1.2rem; }
.portfolio-sidebar p { color: var(--muted); text-align: center; font-size: .72rem; line-height: 1.6; }
.portfolio-sidebar .button { margin-top: .6rem; }
.portfolio-file-label {
  display: block;
  margin-top: 1.2rem;
  color: var(--text);
  font: 700 .62rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.portfolio-sidebar input[type="file"] {
  width: 100%;
  margin-top: .45rem;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: .65rem;
  background: var(--panel);
  color: var(--muted);
  font: 600 .62rem var(--font-mono);
}
.portfolio-sidebar .field-help,
.portfolio-sidebar .form-status {
  margin: .45rem 0 0;
  color: var(--muted);
  text-align: left;
}
.portfolio-sidebar .form-status.is-error { color: var(--red); }
.portfolio-sidebar .form-status.is-success { color: var(--green); }
.portfolio-recovery {
  margin-top: .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem;
  background: color-mix(in srgb, var(--bg-raised) 86%, transparent);
}
.portfolio-recovery[open] { border-color: #5e4c26; }
.portfolio-recovery summary {
  cursor: pointer;
  color: var(--amber);
  font: 700 .62rem var(--font-mono);
  letter-spacing: .04em;
}
.portfolio-recovery > p {
  margin: .65rem 0;
  text-align: left;
}
.portfolio-recovery form {
  display: grid;
  gap: .42rem;
}
.portfolio-recovery label {
  margin-top: .35rem;
  color: var(--muted);
  font: 650 .57rem var(--font-mono);
  text-transform: uppercase;
}
.portfolio-recovery input,
.portfolio-recovery select {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: .68rem .72rem;
  color: var(--text);
  background: var(--bg);
  font: .68rem var(--font-mono);
}
.portfolio-recovery input:focus-visible,
.portfolio-recovery select:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}
.portfolio-recovery .form-status {
  margin: .65rem 0 0;
  text-align: left;
}
.portfolio-saved-region {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}
.portfolio-saved-region h3 {
  margin: 0 0 .55rem;
  color: var(--muted);
  font: 700 .59rem var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.portfolio-saved-list {
  display: grid;
  gap: .45rem;
  max-height: 18rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.portfolio-saved-item {
  width: 100%;
  display: grid;
  gap: .25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.portfolio-saved-item:hover { border-color: var(--blue); }
.portfolio-saved-item[aria-current="true"] {
  border-color: var(--blue-bright);
  background: color-mix(in srgb, var(--blue) 12%, var(--panel));
}
.portfolio-saved-item strong {
  overflow: hidden;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio-saved-item span {
  color: var(--muted);
  font: 600 .55rem var(--font-mono);
}
.portfolio-main { padding: 1rem; }
.portfolio-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.portfolio-summary article { min-height: 110px; display: grid; align-content: center; border: 1px solid var(--line); border-radius: 10px; padding: .85rem; background: var(--bg-raised); }
.portfolio-summary span { color: var(--muted); font: 650 .57rem var(--font-mono); }
.portfolio-summary strong { margin-top: .45rem; font-size: 1.05rem; }
.portfolio-summary small { margin-top: .2rem; color: var(--muted); font-size: .6rem; }
.management-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .7rem; }
.management-actions article { border: 1px solid var(--line); border-radius: 11px; padding: 1rem; background: var(--bg-raised); }
.management-actions header { display: flex; align-items: center; justify-content: space-between; }
.management-actions header b { color: var(--muted); font: 650 .58rem var(--font-mono); }
.action-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; }
.action-icon.close { color: var(--red); background: var(--red-dim); }
.action-icon.target { color: var(--violet); background: rgb(91 75 138 / .12); }
.management-actions h2 { margin: 1rem 0 .6rem; font-size: 1.25rem; }
.management-actions > article > p { color: var(--muted); font-size: .7rem; line-height: 1.55; min-height: 66px; }
.management-actions dl { margin: 1rem 0; border-top: 1px solid var(--line); }
.management-actions dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .55rem 0; }
.management-actions dt { color: var(--muted); font-size: .63rem; }
.management-actions dd { margin: 0; font-size: .63rem; font-weight: 750; }
.management-actions button,
.management-actions .manager-runtime-link { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: .68rem; }
.management-actions .manager-runtime-link { display: grid; place-items: center; padding: .65rem; text-align: center; }
.management-actions .manager-runtime-link:hover { border-color: var(--violet); color: var(--text); }
.management-actions button:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
.management-actions button:focus-visible,
.portfolio-sidebar input:focus-visible,
.portfolio-action-form input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue-bright) 55%, transparent);
  outline-offset: 2px;
}
.portfolio-action-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem .7rem;
  margin-top: .9rem;
}
.portfolio-action-form label {
  color: var(--text);
  font: 700 .6rem var(--font-mono);
  text-transform: uppercase;
}
.portfolio-action-form input {
  min-width: 0;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: .65rem;
  background: var(--panel);
  color: var(--text);
  font: 650 .7rem var(--font-mono);
}
.portfolio-action-form .field-help {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-size: .58rem;
  line-height: 1.4;
}
.portfolio-action-form button,
.portfolio-action-form .form-status {
  grid-column: 1 / -1;
}
.portfolio-action-form .form-status {
  min-height: 1.1rem;
  margin: 0;
  color: var(--muted);
  font-size: .62rem;
}
.portfolio-action-form .form-status.is-error { color: var(--red); }
.portfolio-action-form .form-status.is-success { color: var(--green); }
.portfolio-preview-result {
  margin-top: .85rem;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  padding: .8rem;
  background: var(--panel);
}
.portfolio-preview-result > span {
  color: var(--blue-bright);
  font: 700 .56rem var(--font-mono);
}
.portfolio-preview-result dl { margin: .55rem 0; }
.portfolio-preview-result p {
  min-height: 0 !important;
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .6rem;
}
.close-quote-state {
  min-height: 0 !important;
  margin: -.45rem 0 .75rem !important;
  color: var(--muted);
  font-size: .6rem !important;
  line-height: 1.45;
}
.close-signed-bounds {
  margin-top: .1rem;
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
}
.close-signed-bounds > span { color: var(--green); }
.close-signed-bounds dd {
  max-width: 16rem;
  overflow-wrap: anywhere;
  text-align: right;
}
.portfolio-close-consent {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
  border-top: 1px solid var(--line);
  padding-top: .75rem;
}
.portfolio-close-consent button {
  min-height: 42px;
}
.portfolio-close-consent .field-help,
.portfolio-close-consent .form-status {
  margin: 0;
}
.portfolio-close-consent .form-status.is-error { color: var(--red); }
.portfolio-close-consent .form-status.is-success { color: var(--green); }
.portfolio-close-result dd {
  max-width: 17rem;
  overflow-wrap: anywhere;
}
.portfolio-boundary { display: flex; align-items: center; gap: 1rem; margin-top: .7rem; border: 1px solid rgb(138 90 0 / .32); border-radius: 10px; padding: .85rem; background: rgb(138 90 0 / .07); }
.portfolio-boundary span { color: var(--amber); font: 700 .57rem var(--font-mono); }
.portfolio-boundary p { margin: 0; color: #5f5744; font-size: .65rem; line-height: 1.45; }

.proof-dashboard {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  padding: 1.2rem 0 1rem;
}
.proof-explainer { padding: 1.2rem; }
.proof-explainer ol { list-style: none; padding: 0; margin: 1.5rem 0; }
.proof-explainer li { display: grid; grid-template-columns: 28px 1fr; gap: .7rem; border-top: 1px solid var(--line); padding: 1rem 0; }
.proof-explainer li > b { color: var(--blue-bright); font: 700 .61rem var(--font-mono); }
.proof-explainer strong { font-size: .76rem; }
.proof-explainer p { margin: .3rem 0 0; color: var(--muted); font-size: .64rem; line-height: 1.5; }
.proof-explainer > a { color: var(--green); text-decoration: none; font-size: .67rem; font-weight: 750; }
.proof-inspector { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); overflow: hidden; }
.proof-form { border-right: 1px solid var(--line); }
.proof-form > label,
.proof-form > input,
.proof-form > .field-help,
.proof-form > button,
.proof-form > .form-status { margin-left: 1rem; margin-right: 1rem; width: calc(100% - 2rem); }
.proof-form > label { margin-top: 1rem; }
.verification-result { min-width: 0; }
.verification-proof { padding: 1rem; }
.verification-proof h3 { font-size: 1rem; }
.check-list { list-style: none; padding: 0; margin: .8rem 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.check-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .55rem .65rem; font-size: .61rem; }
.check-list li:last-child { border-bottom: 0; }
.check-list b { color: var(--green); }
.published-proof { margin-bottom: 110px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.published-proof > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1.2rem; }
.published-proof > header span { color: var(--blue-bright); font: 650 .58rem var(--font-mono); }
.published-proof > header h2 { margin: .35rem 0 0; font-size: 1.2rem; }
.published-proof > header > b { color: var(--green); font: 750 .66rem var(--font-mono); }
.published-proof-grid { display: grid; grid-template-columns: 320px 1fr; }
.published-proof-grid dl { margin: 0; border-right: 1px solid var(--line); }
.published-proof-grid dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .75rem 1rem; }
.published-proof-grid dl div:last-child { border-bottom: 0; }
.published-proof-grid dt { color: var(--muted); font-size: .64rem; }
.published-proof-grid dd { margin: 0; font-size: .66rem; font-weight: 750; }
.check-matrix { display: grid; grid-template-columns: repeat(3, 1fr); }
.check-matrix span { display: flex; justify-content: space-between; gap: .5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .7rem; color: var(--muted); font-size: .61rem; }
.check-matrix b { color: var(--green); }
.published-proof > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .9rem 1rem; }
.published-proof > footer code { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .6rem; }
.published-proof > footer a { color: var(--green); text-decoration: none; font-size: .65rem; white-space: nowrap; }

.wallet-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem 0 110px;
}
.wallet-guide {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: var(--panel);
}
.wallet-guide > span { color: var(--blue-bright); font: 650 .59rem var(--font-mono); }
.wallet-guide h2 { margin: 1.2rem 0 .7rem; font-size: 1.45rem; letter-spacing: -.035em; }
.wallet-guide > p { color: var(--muted); font-size: .7rem; line-height: 1.6; }
.wallet-guide ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.wallet-guide li { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; border-top: 1px solid var(--line); padding: .85rem 0; }
.wallet-guide li b { color: var(--green); font: 700 .61rem var(--font-mono); }
.wallet-guide li span { font-size: .68rem; line-height: 1.45; }
.funding-boundary { display: grid; gap: .3rem; border: 1px solid rgb(138 90 0 / .32); border-radius: 9px; padding: .75rem; background: rgb(138 90 0 / .07); }
.funding-boundary strong { color: var(--amber); font-size: .7rem; }
.funding-boundary span { color: #5f5744; font-size: .62rem; line-height: 1.45; }

.content-route { padding-bottom: 110px; }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.2rem 0; }
.security-principle { border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; background: var(--panel); }
.security-principle > span { color: var(--blue-bright); font: 700 .62rem var(--font-mono); }
.security-principle h2 { margin: 2rem 0 .75rem; font-size: 1.35rem; }
.security-principle p { color: var(--muted); font-size: .7rem; line-height: 1.6; }
.security-principle ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.security-principle li { border-top: 1px solid var(--line); padding: .65rem 0; font-size: .65rem; }
.security-principle li::before { content: "✓"; color: var(--green); margin-right: .55rem; }
.approval-risk { border: 1px solid rgb(138 90 0 / .32); border-radius: 14px; padding: 1.3rem; background: rgb(138 90 0 / .07); }
.approval-risk > span { color: var(--amber); font: 650 .59rem var(--font-mono); }
.approval-risk h2 { margin: .7rem 0; font-size: 1.35rem; }
.approval-risk p { max-width: 900px; color: #5f5744; line-height: 1.65; }
.approval-risk a { color: var(--amber); text-decoration: none; font-weight: 750; }

.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.2rem 0; }
.api-grid article { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.api-grid article > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line); padding: .75rem; font: 650 .61rem var(--font-mono); }
.api-grid header span { color: var(--green); }
.api-grid header code { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.api-grid header b { color: var(--blue-bright); font-size: .58rem; }
.api-grid h2 { margin: 1.3rem 1rem .6rem; font-size: 1.25rem; }
.api-grid p { min-height: 90px; margin: 0 1rem; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.api-grid footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 1rem; padding: .75rem 1rem; color: var(--muted-2); font-size: .62rem; }
.api-grid footer a { color: var(--green); text-decoration: none; }
.developer-console { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #05070b; }
.developer-console div { display: grid; grid-template-columns: 100px 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: .8rem 1rem; }
.developer-console div:last-child { border-bottom: 0; }
.developer-console span { color: var(--blue-bright); font: 650 .59rem var(--font-mono); }
.developer-console code { color: #b8c0cc; font-size: .66rem; overflow-wrap: anywhere; }
.developer-actions { display: flex; gap: .7rem; margin-top: 1rem; }

.site-footer {
  width: var(--shell);
  min-height: 120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
}
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand div { display: grid; gap: .15rem; }
.footer-brand strong { font-size: .8rem; }
.footer-brand span { color: var(--muted); font-size: .61rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: .65rem; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer > p { grid-column: 1 / -1; margin: 0; color: var(--muted-2); font-size: .6rem; }

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

@media (max-width: 1120px) {
  :root { --shell: min(1440px, calc(100% - 32px)); }
  .home-hero { grid-template-columns: 1fr 420px; gap: 2.5rem; }
  .site-nav > a,
  .nav-more > button { padding-inline: .5rem; }
  .brand-copy small,
  .live-indicator span { display: none; }
  .trade-workspace { grid-template-columns: minmax(0, 1fr) 370px; }
  .wallet-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 900px) {
  .header-shell { min-height: 66px; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .js .nav-toggle { order: 3; display: inline-flex; margin-left: 0; }
  .js .site-nav {
    position: fixed;
    inset: 66px 0 auto;
    z-index: 110;
    max-height: 0;
    display: grid;
    align-content: start;
    gap: .35rem;
    overflow: hidden;
    visibility: hidden;
    border-bottom: 1px solid var(--line-bright);
    padding: 0 16px;
    background: var(--bg);
    transition: max-height .18s ease, padding .18s ease, visibility .18s;
  }
  .js .site-nav.is-open { max-height: calc(100vh - 66px); overflow-y: auto; visibility: visible; padding-block: 1rem; }
  .site-nav > a,
  .nav-more > button { min-height: 52px; justify-content: space-between; border: 1px solid var(--line); padding-inline: 1rem; }
  .nav-more > button { width: 100%; }
  .more-menu { position: static; width: 100%; margin-top: .35rem; box-shadow: none; }
  .header-actions { flex: 0 0 auto; }
  .live-indicator { display: none; }
  .home-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 64px; }
  .execution-console { max-width: 620px; width: 100%; }
  .split-heading,
  .trust-architecture { grid-template-columns: 1fr; gap: 2rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 330px; }
  .trade-workspace { grid-template-columns: 1fr; }
  .order-ticket { position: static; }
  .portfolio-shell,
  .proof-dashboard,
  .wallet-layout { grid-template-columns: 1fr; }
  .wallet-guide { position: static; }
  .security-grid,
  .api-grid { grid-template-columns: 1fr; }
  .proof-inspector { grid-template-columns: 1fr; }
  .proof-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .published-proof-grid { grid-template-columns: 1fr; }
  .published-proof-grid dl { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  :root { --shell: min(1440px, calc(100% - 24px)); }
  .brand-copy { display: none; }
  .header-shell { gap: .45rem; }
  .brand-mark { width: 36px; height: 36px; }
  .header-actions { gap: .35rem; }
  .wallet-trigger { width: 42px; min-width: 42px; padding: 0; }
  #wallet-trigger-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .wallet-chevron { display: none; }
  .nav-toggle { min-width: 58px; padding-inline: .55rem; }
  .wallet-menu {
    position: fixed;
    top: 74px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .home-hero { gap: 2.4rem; padding: 48px 0 64px; }
  .hero-signal h1 {
    max-width: 100%;
    font-size: clamp(2.6rem, 11.4vw, 3.35rem);
    line-height: .94;
    letter-spacing: -.062em;
    overflow-wrap: normal;
  }
  .hero-signal .eyebrow { font-size: .58rem; letter-spacing: .075em; }
  .hero-signal .lede { text-wrap: pretty; }
  .market-launcher > div { grid-template-columns: 1fr; }
  .market-launcher footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-guarantees { grid-template-columns: 1fr; gap: .45rem; }
  .hero-guarantees li { padding: .58rem .7rem; }
  .execution-console { border-radius: 13px; }
  .execution-console > header { padding-inline: .8rem; font-size: .54rem; }
  .console-market { padding: 1.15rem 1rem .6rem; }
  .position-summary,
  .execution-metrics,
  .proof-line { margin-inline: 1rem; }
  .position-summary { grid-template-columns: auto 1fr; }
  .position-summary > b { grid-column: 1 / -1; }
  .execution-metrics { grid-template-columns: 1fr; }
  .execution-metrics div { border-right: 0; }
  .execution-metrics div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .execution-metrics div:last-child { border-bottom: 0; }
  .execution-console > footer { align-items: start; flex-direction: column; }
  .market-desk,
  .trust-architecture { padding: 76px 0; }
  .route-header { min-height: 0; align-items: start; flex-direction: column; padding: 54px 0 34px; }
  .route-header h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .route-price,
  .assurance-chip { width: 100%; min-width: 0; }
  .journey-progress { grid-template-columns: 1fr 1fr; }
  .journey-progress li:nth-child(2) { border-right: 0; }
  .journey-progress li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .market-search-row { grid-template-columns: 1fr; }
  .market-search-help { align-items: start; flex-direction: column; }
  .market-title-row { flex-direction: column; }
  .market-chart { height: 130px; }
  .market-quotes,
  .trade-principles { grid-template-columns: 1fr; }
  .trade-principles div { border-right: 0; border-bottom: 1px solid var(--line); }
  .trade-principles div:last-child { border-bottom: 0; }
  .result-order,
  .exposure-panel { grid-template-columns: 1fr; }
  .result-order div,
  .exposure-panel div { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-order div:last-child,
  .exposure-panel div:last-child { border-bottom: 0; }
  .portfolio-summary,
  .management-actions { grid-template-columns: 1fr; }
  .portfolio-boundary { align-items: start; flex-direction: column; }
  .check-matrix { grid-template-columns: 1fr 1fr; }
  .published-proof > header,
  .published-proof > footer { align-items: start; flex-direction: column; }
  .published-proof > footer code { width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .developer-console div { grid-template-columns: 1fr; gap: .35rem; }
  .developer-actions { flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
  .site-footer > p { grid-column: auto; }
}

@media (max-width: 380px) {
  :root { --shell: min(1440px, calc(100% - 20px)); }
  .nav-toggle { min-width: 42px; width: 42px; padding: 0; }
  .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero-signal h1 { font-size: clamp(2.4rem, 11.2vw, 2.85rem); }
  .wallet-menu-actions { grid-template-columns: 1fr; }
  .wallet-menu-actions .quiet-action { grid-column: auto; }
}

/* ============================================================
   Paper home
   The marketing surface is a document, not a dashboard. A judge
   who cannot connect a wallet still gets the whole argument and
   the evidence. Scoped to the home route so the execution app
   keeps its dark terminal treatment untouched.
   ============================================================ */

body {
  --bg: #f7f4ed;
  --bg-raised: #f2eee4;
  --panel: #fffdf8;
  --panel-2: #f2eee4;
  --panel-3: #eae4d6;
  --ink: #191712;
  --text: #191712;
  --muted: #6d665a;
  --muted-2: #6f6759;

  /* Semantic colours were tuned for the dark theme and became unreadable the
     moment the surfaces went light — bright green on near-white measures about
     1.7:1, and it carries LIVE state, PASS checks and error text. These are
     the same hues darkened until each clears 4.5:1 on both paper and panel.
     Measured, not eyeballed. */
  --green: #1c6e4e;
  --green-dim: rgb(28 110 78 / .10);
  --red: #a3282f;
  --red-dim: rgb(163 40 47 / .10);
  --amber: #8a5a00;
  --violet: #5b4b8a;
  --line: #ddd6c8;
  --line-bright: #c9c0ad;
  --blue: #2f4f8f;
  --blue-bright: #2f4f8f;
  background: var(--bg);
  color: var(--ink);
}

.app-header {
  background: rgb(247 244 237 / .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
}

body:has([data-route-view="home"].is-active) .more-menu,
body:has([data-route-view="home"].is-active) .wallet-menu {
  background: var(--panel);
  box-shadow: 0 18px 60px rgb(55 46 29 / .16);
}

body:has([data-route-view="home"].is-active) .wallet-trigger.has-memory {
  border-color: var(--line-bright);
  background: var(--panel-2);
  color: var(--ink);
}

.paper {
  --paper-serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --paper-accent: #8a3324;
  --paper-rail: 13rem;
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem) 5rem;
  max-width: 1200px;
  color: var(--ink);
}

/* Ledger grid. Headings and marginalia sit in a left rail, the record runs
   wide beside them. This is what fills the horizontal space instead of a
   narrow column stranded between two empty gutters, and it is the structure
   a printed account uses: label in the margin, figures in the body. */
@media (min-width: 900px) {
  .paper > section {
    display: grid;
    grid-template-columns: var(--paper-rail) minmax(0, 1fr);
    column-gap: 3.5rem;
    align-items: start;
  }
  .paper > section > * { grid-column: 2; }
  .paper > section > .paper-h2,
  .paper > section > .paper-rule-head { grid-column: 1; grid-row: 1 / span 99; align-self: start; }
  .paper > section > .paper-rule-head { display: block; }
  .paper-rule-head .paper-stamp { margin-top: .6rem; }
  /* The hero is its own two-column object: argument left, receipt right.
     It opts out of the rail so the receipt sits beside the headline. */
  .paper > section.paper-hero {
    grid-template-columns: minmax(0, 1fr) 20rem;
    column-gap: 3.5rem;
  }
  .paper > section.paper-hero > * { grid-column: auto; grid-row: auto; }
}

.paper section + section {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.paper-eyebrow {
  margin: 0 0 1.75rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.paper-display {
  margin: 0;
  font-family: var(--paper-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.paper-lede {
  margin: 1.75rem 0 0;
  font-family: var(--paper-serif);
  font-size: clamp(1.12rem, 2.1vw, 1.34rem);
  line-height: 1.62;
  max-width: 62ch;
}

.paper-sub {
  margin: 1.15rem 0 0;
  font-size: .98rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 62ch;
}

.paper-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.paper-cta {
  display: inline-block;
  padding: .72rem 1.35rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  border-radius: 2px;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .15s ease;
}
.paper-cta:hover { opacity: .82; }
.paper-cta-quiet { background: transparent; color: var(--ink); }
.paper-cta-quiet:hover { background: var(--panel-3); opacity: 1; }

.paper-h2 {
  margin: 0;
  font-family: var(--paper-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -.012em;
}

.paper-h3 {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.paper-rule-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; }

.paper-stamp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.paper-note, .paper-body { margin: 1.15rem 0 0; font-size: 1rem; line-height: 1.68; max-width: 64ch; }

.paper-footnote {
  margin: 1.15rem 0 0;
  font-size: .86rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 66ch;
}
.paper-footnote code { font-family: var(--font-mono); font-size: .92em; }

.paper-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.paper-table-scroll {
  width: 100%;
  margin-top: 2rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.paper-table-scroll:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}
.paper-table th, .paper-table td { text-align: left; padding: .85rem .75rem .85rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.paper-table thead th {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--line-bright);
}
.paper-table tbody th {
  font-family: var(--paper-serif);
  font-size: 1.08rem;
  font-weight: 400;
  white-space: nowrap;
}
.paper-table td { font-family: var(--font-mono); font-size: .88rem; }
.paper-table a { color: var(--ink); text-decoration-color: var(--line-bright); text-underline-offset: 3px; }
.paper-table a:hover { text-decoration-color: var(--ink); }
.paper-cell-note { display: block; margin-top: .2rem; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
.paper-muted { color: var(--muted); }

.paper-verdict {
  margin: 1.5rem 0 0;
  font-family: var(--paper-serif);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.35;
}
.paper-verdict-mark { color: var(--paper-accent); }

.paper-list { margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: boundary; }
.paper-list li { position: relative; padding-left: 3.25rem; margin-top: 1.85rem; counter-increment: boundary; }
.paper-list li:first-child { margin-top: 0; }
.paper-list li::before {
  content: counter(boundary, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .12rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .06em;
}
.paper-list h3 { margin: 0 0 .4rem; font-family: var(--paper-serif); font-size: 1.16rem; font-weight: 400; }
.paper-list p { margin: 0; font-size: .96rem; line-height: 1.62; color: var(--muted); max-width: 58ch; }

.paper-code {
  margin: 1.75rem 0 0;
  padding: 1.15rem 1.25rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.75;
}
.paper-code code { color: var(--ink); }

.paper-price-grid { display: grid; gap: 2rem; margin-top: 2rem; grid-template-columns: 1fr; }
.paper-price-grid article { padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.paper-price { margin: 0 0 .5rem; font-family: var(--paper-serif); font-size: 2rem; line-height: 1; }
.paper-price span { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; color: var(--muted); }
.paper-price-grid h3 { margin: 0 0 .45rem; font-size: 1rem; font-weight: 600; }
.paper-price-grid p { margin: 0; font-size: .94rem; line-height: 1.6; color: var(--muted); }

.paper-disclosure { color: var(--muted); }
.paper-disclosure p { margin: 0 0 .9rem; font-size: .88rem; line-height: 1.68; max-width: 68ch; }
.paper-disclosure p:last-child { margin-bottom: 0; }
.paper-disclosure strong { color: var(--ink); font-weight: 600; }

.paper-figures { margin: 2rem 0 0; display: grid; gap: 0; grid-template-columns: 1fr; }
.paper-figures > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.paper-figures dt { font-size: .82rem; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.paper-figures dd { margin: 0; font-family: var(--font-mono); font-size: .95rem; font-variant-numeric: tabular-nums; text-align: right; }
.paper-figures a { color: var(--ink); text-decoration-color: var(--line-bright); text-underline-offset: 3px; }
.paper-figures a:hover { text-decoration-color: var(--ink); }
.paper-signed .paper-footnote code { word-break: break-all; }

@media (max-width: 520px) {
  .paper-table { min-width: 610px; }
}

/* Screen-reader-only utility. The record table needs a caption for
   assistive technology, but it must not print above the table. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .paper-price-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (min-width: 720px) {
  .paper-figures { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .paper-cta { transition: none; }
}

.paper-cta-link {
  align-self: center;
  font-size: .92rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-bright);
  padding-bottom: 2px;
  transition: border-color .15s ease;
}
.paper-cta-link:hover { border-bottom-color: var(--ink); }

.paper-next { margin: 1.75rem 0 0; }
.paper-next a {
  font-size: .95rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-bright);
  padding-bottom: 2px;
  transition: border-color .15s ease;
}
.paper-next a:hover { border-bottom-color: var(--ink); }

/* Numbers carry the page; prose gets out of the way. */
.paper-figure-lead { margin: 2rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; }
.paper-figure-big {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: .95;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--paper-accent);
}
.paper-figure-rel { font-family: var(--paper-serif); font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); }
.paper-figure-rel strong { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums; }

.paper-leg-grid { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 0; grid-template-columns: 1fr; }
.paper-leg-grid li { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.paper-leg-grid li:first-child { border-top: 2px solid var(--ink); }
.paper-leg-name { margin: 0 0 .5rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.paper-leg-figure { margin: 0 0 .35rem; font-family: var(--font-mono); font-size: 1.85rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.paper-leg-figure span { font-size: .7rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.paper-leg-meta { margin: 0 0 .5rem; font-size: .82rem; color: var(--muted); }
.paper-leg-chain { margin: 0 0 .3rem; font-family: var(--font-mono); font-size: .78rem; }
.paper-leg-chain a { color: var(--ink); text-decoration-color: var(--line-bright); text-underline-offset: 3px; }
.paper-leg-time { margin: 0; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }

.paper-close-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.paper-price-row { margin: 0 0 .55rem; font-size: .98rem; }
.paper-price-row strong { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 400; }
.paper-price-row span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.paper-disclosure-line {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  line-height: 1.66;
  color: var(--muted);
  max-width: 70ch;
}
.paper-disclosure-line strong { color: var(--ink); font-weight: 600; }

@media (min-width: 700px) {
  .paper-leg-grid { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
  .paper-leg-grid li { border-top: 2px solid var(--ink); }
  .paper-close-grid { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

/* One voice across the site. The app routes kept a tight condensed sans
   display face while the home moved to a serif; on the same paper that
   reads as two products. Route headings now share the document's serif,
   while data, labels and controls stay monospace and sans. */
:root { --paper-serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif; }

.route-view h1,
.route-view h2:not(.paper-h3) {
  font-family: var(--paper-serif);
  font-weight: 400;
  letter-spacing: -.015em;
}
.route-view h1 { line-height: 1.06; }
.route-view h1 em { font-style: italic; }

/* ------------------------------------------------------------------
   The receipt
   Conviction exists to produce one artifact, so the artifact is the
   hero rather than a paragraph describing it. Perforated foot, stamped
   verdict, monospace throughout: a trade confirmation slip, not a card.
   ------------------------------------------------------------------ */
.paper-hero { display: grid; gap: 3rem; align-items: start; }
.paper-hero-copy > :first-child { margin-top: 0; }

/* Submission command centre: Claude's paper identity with terminal density. */
.paper-command { display: block !important; }
.paper-command-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
}
.paper-command-head .paper-eyebrow { margin-bottom: .45rem; }
.paper-command-head h1 {
  margin: 0;
  font-family: var(--paper-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -.025em;
}
.paper-command-head > p { margin: 0; color: var(--muted); font-size: .8rem; }
.paper-status-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line-bright);
  background: var(--panel);
}
.paper-status-strip article {
  min-width: 0;
  display: grid;
  gap: .25rem;
  border-right: 1px solid var(--line);
  padding: .7rem .8rem;
}
.paper-status-strip article:last-child { border-right: 0; }
.paper-status-strip span,
.paper-command-grid header span {
  color: var(--muted);
  font: 600 .56rem var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.paper-status-strip strong { overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.paper-status-strip strong.is-live { color: var(--green); }
.paper-status-strip small { overflow: hidden; color: var(--muted); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.paper-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  grid-template-areas: "market ticket" "positions proof";
  gap: .65rem;
  margin-top: .65rem;
}
.paper-market-panel,
.paper-open-ticket,
.paper-position-panel,
.paper-proof-panel { min-width: 0; border: 1px solid var(--line-bright); background: var(--panel); }
.paper .paper-command-grid > section {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid var(--line-bright);
}
.paper-market-panel { grid-area: market; }
.paper-open-ticket { grid-area: ticket; }
.paper-position-panel { grid-area: positions; }
.paper-proof-panel { grid-area: proof; }
.paper-command-grid header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: .6rem .75rem;
}
.paper-command-grid h2 { margin: .12rem 0 0; font-size: 1rem; }
.paper-command-grid header > b {
  border: 1px solid var(--line-bright);
  padding: .25rem .4rem;
  color: var(--muted);
  font: 600 .55rem var(--font-mono);
  text-transform: uppercase;
}
.paper-market-panel form { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
.paper-market-panel input { min-width: 0; min-height: 48px; border: 0; border-radius: 0; padding: 0 .8rem; background: transparent; color: var(--ink); }
.paper-market-panel form button {
  border: 0;
  border-left: 1px solid var(--ink);
  padding: 0 1.1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
}
.paper-market-row { min-height: 60px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.25rem; padding: .75rem; }

.route-workflow-strip {
  width: var(--shell);
  margin: 0 auto 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.route-workflow-strip article {
  min-width: 0;
  padding: .7rem .8rem;
  border-right: 1px solid var(--line);
}
.route-workflow-strip article:last-child { border-right: 0; }
.route-workflow-strip span,
.route-workflow-strip strong,
.route-workflow-strip small { display: block; }
.route-workflow-strip span {
  margin-bottom: .28rem;
  color: var(--text-muted);
  font: 700 .57rem/1.2 var(--font-mono);
  letter-spacing: .08em;
}
.route-workflow-strip strong {
  color: var(--text);
  font-size: .76rem;
  line-height: 1.25;
}
.route-workflow-strip small {
  margin-top: .2rem;
  color: var(--text-muted);
  font-size: .64rem;
  line-height: 1.3;
}
.proof-workflow-strip article:last-child strong { color: var(--green); }
.paper-market-row strong { font-size: .75rem; }
.paper-market-row span { color: var(--muted); font: .65rem var(--font-mono); }
.paper-market-panel footer { border-top: 1px solid var(--line); padding: .45rem .75rem; color: var(--muted); font: .56rem var(--font-mono); }
.paper-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .65rem .75rem; }
.paper-outcomes span { border: 1px solid var(--line-bright); padding: .5rem; text-align: center; font: 700 .64rem var(--font-mono); }
.paper-outcomes span:first-child { border-color: #72a68f; background: var(--green-dim); color: var(--green); }
.paper-open-ticket dl,
.paper-proof-panel dl { margin: 0 .75rem .55rem; }
.paper-open-ticket dl div,
.paper-proof-panel dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .42rem 0; }
.paper-open-ticket dt,
.paper-proof-panel dt { color: var(--muted); font-size: .58rem; }
.paper-open-ticket dd,
.paper-proof-panel dd { margin: 0; font: 600 .58rem var(--font-mono); text-align: right; }
.paper-open-ticket > a {
  display: block;
  margin: .65rem .75rem .75rem;
  padding: .65rem;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  text-decoration: none;
  font-size: .7rem;
  font-weight: 650;
}
.paper-position-panel header > a,
.paper-proof-panel > a { color: var(--blue); font-size: .62rem; text-decoration: none; }
.paper-position-panel > div { min-height: 112px; display: grid; align-content: center; justify-items: start; padding: .9rem; }
.paper-position-panel p { margin: .35rem 0 .45rem; color: var(--muted); font-size: .66rem; }
.paper-position-panel > div > a { color: var(--blue); font-size: .62rem; text-decoration: none; }
.paper-proof-panel > a { display: inline-block; margin: 0 .75rem .75rem; }

@media (min-width: 901px) {
  .route-header { padding: 30px 0 24px; }
  .route-header h1 { font-size: clamp(2.4rem, 4vw, 3.7rem); }
  .route-header > div:first-child > p:last-child { margin-top: .7rem; line-height: 1.5; }
}

@media (max-width: 900px) {
  .paper-command-grid { grid-template-columns: 1fr; grid-template-areas: "market" "ticket" "positions" "proof"; }
  .paper-status-strip { grid-template-columns: repeat(2, 1fr); }
  .paper-status-strip article { border-bottom: 1px solid var(--line); }
  .paper-status-strip article:nth-child(2n) { border-right: 0; }
  .paper-status-strip article:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 520px) {
  .paper { padding-top: 1.5rem; }
  .paper-command-head { align-items: start; flex-direction: column; gap: .3rem; }
  .paper-command-head h1 { font-size: 2rem; }
  .paper-market-panel form { grid-template-columns: 1fr; }
  .paper-market-panel form button { min-height: 40px; border-left: 0; border-top: 1px solid var(--ink); }
  .brand-copy { display: none; }
  .wallet-trigger {
    width: auto;
    min-width: 0;
    padding: .55rem .65rem;
  }
  #wallet-trigger-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .wallet-dot { display: none; }
  .route-workflow-strip {
    grid-template-columns: 1fr 1fr;
  }
  .route-workflow-strip article:nth-child(2) { border-right: 0; }
  .route-workflow-strip article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .nav-toggle { order: 2; margin-left: auto; }
  .header-actions { order: 3; margin-left: 0; }
  .live-indicator { display: none; }
  .wallet-trigger { max-width: 128px; padding: 0 .55rem; }
  #wallet-trigger-label {
    position: static;
    width: auto;
    height: auto;
    overflow: hidden;
    clip-path: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .wallet-chevron { display: none; }
}

.receipt {
  margin: 0;
  padding: 1.6rem 1.6rem 2.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: none;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  box-shadow: 0 20px 50px rgb(60 50 30 / .07);
  position: relative;
}
/* Perforated tear-off foot, drawn rather than imaged so the CSP holds. */
.receipt::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -11px;
  height: 12px;
  background: var(--panel);
  border-inline: 1px solid var(--line);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 14px);
  mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 14px);
  -webkit-mask-size: 14px 100%;
  mask-size: 14px 100%;
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--ink);
}
.receipt-meta { margin: .7rem 0 1.2rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.receipt-rows { margin: 0; }
.receipt-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; }
.receipt-rows dt { color: var(--muted); }
.receipt-rows dd { margin: 0; font-variant-numeric: tabular-nums; }
.receipt-row-key dd { font-size: 1.05rem; color: var(--paper-accent); }
.receipt-under {
  border-top: 1px dashed var(--line-bright);
  margin-top: .35rem;
  padding-top: .6rem !important;
}
.receipt-under dd { color: var(--paper-accent); }
.receipt-rows-quiet { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--muted); }
.receipt-rows-quiet dd { color: var(--ink); }

.receipt-stamp {
  margin: 1.4rem 0 0;
  padding: .5rem 0;
  text-align: center;
  font-size: .82rem;
  letter-spacing: .22em;
  border: 2px solid var(--paper-accent);
  color: var(--paper-accent);
}
.receipt-foot { margin: 1rem 0 0; font-size: .66rem; line-height: 1.6; color: var(--muted); letter-spacing: .02em; }




/* The developer console stays dark on purpose, so it keeps the original
   semantic palette. Retinting it for paper would make its own text unreadable
   — the opposite of the problem being fixed. */
.developer-console {
  --blue: #3f6df6;
  --blue-bright: #6f92ff;
  --green: #55dc9c;
  --green-dim: #183e32;
  --red: #ff6e7e;
  --red-dim: #412029;
  --amber: #f2b85b;
  --violet: #a78bfa;
  --ink: #f6f8fb;
  --muted: #929dac;
  --muted-2: #647080;
  --line: #273140;
  --line-bright: #364459;
}

/* ------------------------------------------------------------------
   Post-hero sections
   These were competent typography with a dead right third. Each now
   carries its own object: the attack as a card diff, the boundaries as
   refusals, the round trip with its timing spine. Content fills the
   measure instead of trailing off.
   ------------------------------------------------------------------ */

/* The attack, shown rather than described. Signed against submitted, with
   the field that changed marked and the verdict stamped across both. */
.tamper { margin-top: 2rem; }
.tamper-pair { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.tamper-card { border: 1px solid var(--line); background: var(--panel); padding: 1.1rem 1.2rem; }
.tamper-card-bad { border-color: rgb(163 40 47 / .45); }
.tamper-label {
  margin: 0 0 .85rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tamper-card dl { margin: 0; font-family: var(--font-mono); font-size: .82rem; }
.tamper-card dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; border-bottom: 1px solid var(--line); }
.tamper-card dl > div:last-child { border-bottom: none; }
.tamper-card dt { color: var(--muted); }
.tamper-card dd { margin: 0; }
.tamper-diff dd { color: var(--red); }
.tamper-diff dt { color: var(--red); }

.tamper-verdict {
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-family: var(--paper-serif);
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
}
.tamper-verdict span {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  border: 2px solid var(--red);
  padding: .35rem .9rem;
}

/* Boundaries as refusals. What a bound does is say no to something
   specific, so each one names the thing it will not do. */
.bounds { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 2rem; grid-template-columns: 1fr; }
.bounds li { border-top: 2px solid var(--ink); padding-top: 1rem; }
.bounds-n { margin: 0 0 .6rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; color: var(--muted); }
.bounds h3 { margin: 0 0 .5rem; font-family: var(--paper-serif); font-size: 1.12rem; font-weight: 400; line-height: 1.25; }
.bounds-body { margin: 0 0 1rem; font-size: .9rem; line-height: 1.6; color: var(--muted); }
.bounds-refuse {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: .8rem;
  border-top: 1px dashed var(--line-bright);
}
.bounds-refuse em { font-style: normal; color: var(--red); }

/* The round trip's real claim is speed under a bound, so the timings get
   their own line rather than hiding in a footnote. */
.legs-spine {
  margin: 1.75rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .02em;
  color: var(--muted);
}
.legs-spine strong { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .tamper-pair { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .bounds { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
}

/* The execution desk used to open on an empty panel and a glyph, which tells a
   visitor who cannot connect a wallet nothing at all. It now shows one real
   bounded ticket end to end — inputs above, what actually happened below —
   drawn from the published proof and labelled as such, never as a live quote.
   It is replaced by the real card the moment a market is loaded. */
.worked { margin-top: 1.5rem; text-align: left; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.worked-label {
  margin: 0 0 .9rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.worked-rows { margin: 0; font-family: var(--font-mono); font-size: .78rem; }
.worked-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; }
.worked-rows dt { color: var(--muted); }
.worked-rows dd { margin: 0; font-variant-numeric: tabular-nums; }
.worked-rows-out { border-top: 1px solid var(--line); padding-top: .5rem; }
.worked-key dd { color: var(--paper-accent); }
.worked-arrow { margin: .55rem 0; text-align: center; color: var(--muted-2); font-size: .9rem; }
.worked-foot { margin: 1rem 0 0; font-size: .74rem; line-height: 1.6; color: var(--muted); }
.worked-foot a { color: var(--ink); text-underline-offset: 3px; }

/* The refusals, as recorded. An earlier version of this section drew a single
   tampered card by combining the OPEN leg's bounds with the CLOSE leg's
   rewritten-shares result — two different gates presented as one run. The
   artifact records eleven refusal properties across three legs, so it is shown
   as the table it actually is, which is both true and a stronger claim. */
.refusals { width: 100%; margin-top: 2rem; border-collapse: collapse; font-size: .88rem; }
.refusals caption { text-align: left; }
.refusals th, .refusals td { text-align: left; padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.refusals thead th {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--ink);
}
.refusals tbody th { font-weight: 400; }
.refusals td { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.refusals tbody td:last-child { color: var(--red); text-align: right; font-size: .88rem; }
.refusals thead th:last-child { text-align: right; }
.paper-leg-time span { font-size: .68rem; letter-spacing: .06em; color: var(--muted-2); }

/* The acceptance run predates the native OKX handoff and the artifact says so.
   Presenting the timings beside the current product without that reads as
   evidence for a path this run never exercised, so the limitation is given
   weight rather than left in the file. */
.paper-provenance {
  margin: 1.75rem 0 0;
  padding: .95rem 1.1rem;
  border-left: 2px solid var(--paper-accent);
  background: var(--panel-2);
  font-size: .86rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 66ch;
}
.paper-provenance strong { color: var(--ink); font-weight: 600; }
.paper-provenance code { font-family: var(--font-mono); font-size: .92em; color: var(--ink); }
