:root {
  --paper: #edf9f1;
  --outer-plate: #f2f5ee;
  --surface: #fcfdfd;
  --text: #080f2a;
  --muted: #667496;
  --loss: #e0218a;
  --loss-bright: #fc0b54;
  --twin: #16a34a;
  --twin-bright: #00c954;
  --line: #c9ddd4;
  --ink-button: #071525;
  --spring: cubic-bezier(.22, 1.18, .36, 1);
  --quick: 180ms;
  --move: 320ms;
  --settle: 400ms;
  --page-gutter: 6.625rem;
  font-size: .8333333333vw;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  min-width: 0;
  background: var(--outer-plate);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--text);
  font-family: "Barlow", sans-serif;
  font-size: max(12px, 1rem);
}

a, button, input, select { font: inherit; }
a { color: inherit; }
button { color: inherit; }

.page-frame {
  width: calc(100% - (2 * var(--page-gutter)));
  min-height: calc(100vh - 15rem);
  margin-inline: var(--page-gutter);
  padding: 0;
  background: var(--paper);
  outline: none;
}

header[data-chrome="nav"] {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 8.25rem;
  padding: 2.75rem 2rem 0 3.5rem;
  background: var(--outer-plate);
  color: var(--text);
  font-family: "Barlow", sans-serif;
}

.bar {
  height: 5.0625rem;
  padding: 0 1.9375rem;
  border-radius: 1.25rem;
  background: #fff;
  display: grid;
  grid-template-columns: 26.25rem 1fr 25rem;
  align-items: center;
  box-shadow: 0 .5rem 1.5rem rgba(13, 31, 23, .025);
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}

.brand { gap: .75rem; font-size: max(12px, 1.125rem); }
.brand img { display: block; width: 3.75rem; height: 3.75rem; object-fit: contain; }

.nav-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.25rem;
}

.nav-desktop a, .utility a {
  position: relative;
  color: var(--muted);
  font-size: max(12px, 1.0625rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--quick) ease, transform var(--quick) var(--spring);
}

.nav-desktop a:hover, .utility a:hover { color: var(--text); transform: translateY(-.08rem); }
.nav-desktop a.is-active { color: var(--text); font-weight: 800; }
.nav-desktop a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5625rem;
  height: .1875rem;
  border-radius: .125rem;
  background: var(--loss);
  animation: active-seam var(--move) var(--spring) both;
}

.utility { display: flex; align-items: center; justify-content: flex-end; gap: 2.375rem; }
.menu-toggle, .nav-mobile { display: none; }

footer[data-chrome="footer"] {
  width: 100%;
  height: 6.75rem;
  padding: .8125rem 5rem 1rem;
  color: var(--muted);
  background: var(--outer-plate);
  border-top: 1px solid #d6ddd5;
  font-family: "Barlow", sans-serif;
}

footer .top, footer .bottom { display: flex; align-items: center; }
footer .top { height: 2.4375rem; gap: 3rem; }
.footer-brand { gap: .4rem; font-size: max(12px, .75rem); }
.footer-brand img { width: 2rem; height: 2rem; object-fit: contain; }
footer a, footer .top > span {
  color: #53658c;
  font-size: max(12px, .875rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
footer .pons { margin-left: .75rem; }
footer .bottom {
  height: 2.4375rem;
  justify-content: space-between;
  gap: 2.5rem;
  font-size: max(12px, .8125rem);
  font-weight: 500;
  white-space: nowrap;
}

main.is-leaving { opacity: .56; transform: translateX(-.45rem) scaleX(.994); transform-origin: left center; }
main.is-entering { opacity: .62; transform: translateX(.45rem) scaleX(.994); transform-origin: right center; }
main { transition: opacity 200ms ease, transform 200ms var(--spring); }

[data-ledger-reveal], [data-receipt-reveal], [data-grow-in] {
  opacity: 0;
  transform: scaleX(.975);
  transform-origin: left center;
  transition: opacity var(--move) ease, transform var(--move) var(--spring);
}
[data-receipt-reveal] { transform: translateY(-.65rem) rotate(.15deg); transform-origin: center top; }
[data-ledger-reveal].is-visible, [data-receipt-reveal].is-visible, [data-grow-in].is-visible { opacity: 1; transform: none; }

[data-pair-motion] { transition: transform var(--move) var(--spring), opacity var(--quick) ease; }
[data-pair-motion]:hover [data-loss-card] { transform: translateX(.35rem) rotate(.35deg); }
[data-pair-motion]:hover [data-twin-card] { transform: translateX(-.35rem) rotate(-.35deg); }
[data-loss-card], [data-twin-card] { transition: transform var(--move) var(--spring); }
[data-live-tick].is-ticking { animation: ink-tick var(--move) var(--spring); }

@keyframes active-seam { from { opacity: 0; transform: scaleX(.25); } to { opacity: 1; transform: scaleX(1); } }
@keyframes ink-tick { 0% { transform: scaleY(1); } 48% { transform: scaleY(.88); } 100% { transform: scaleY(1); } }

:focus-visible { outline: 2px solid var(--loss); outline-offset: 3px; }

@media (max-width: 1023px) {
  :root { --page-gutter: 20px; font-size: 16px; }
  header[data-chrome="nav"] { height: auto; min-height: 88px; padding: 16px; }
  .bar { height: 64px; padding: 0 16px; border-radius: 16px; grid-template-columns: 1fr auto; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 42px; height: 42px; }
  .nav-desktop, .utility { display: none; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 10px 14px;
    border: 0;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .nav-mobile {
    position: absolute;
    top: 80px;
    right: 16px;
    left: 16px;
    z-index: 30;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(8, 15, 42, .12);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-mobile:not([hidden]) { display: grid; }
  .nav-mobile a { padding: 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; }
  .nav-mobile a.is-active { color: var(--text); background: #fff0f7; }
  .page-frame { min-height: calc(100vh - 88px); }
  footer[data-chrome="footer"] { height: auto; padding: 18px 20px 22px; }
  footer .top { height: auto; flex-wrap: wrap; gap: 14px 22px; }
  footer .bottom { height: auto; margin-top: 18px; flex-direction: column; align-items: flex-start; gap: 8px; white-space: normal; line-height: 1.4; }
  footer .pons { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  main, main.is-leaving, main.is-entering, [data-ledger-reveal], [data-receipt-reveal], [data-grow-in] { opacity: 1 !important; transform: none !important; }
}

/* Shared ground: navigation, route canvas, and footer are one continuous page. */
html { background: var(--paper); }
body {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 73% 5%, rgba(0, 201, 84, .08), transparent 24rem),
    radial-gradient(circle at 12% 92%, rgba(224, 33, 138, .055), transparent 30rem),
    var(--paper);
}
.page-frame { flex: 1 0 auto; background: transparent; }
header[data-chrome="nav"] { background: transparent; }
.bar {
  grid-template-columns: 23rem 1fr 31rem;
  background: rgba(237, 249, 241, .72);
  border: 1px solid rgba(91, 133, 116, .34);
  box-shadow: 0 .5rem 1.5rem rgba(13, 31, 23, .035);
  backdrop-filter: blur(14px);
}
.utility { gap: 1.35rem; }
.wallet-control { position: relative; }
.wallet-connect {
  min-height: 2.75rem;
  padding: .7rem 1rem;
  border: 1px solid #8faaa0;
  border-radius: .8rem;
  background: var(--ink-button);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--quick) var(--spring), background var(--quick) ease;
}
.wallet-connect:hover { transform: translateY(-.08rem); background: #10283a; }
.wallet-connect.is-connected { background: #fff; color: var(--text); border-color: var(--twin); font-family: "JetBrains Mono", monospace; }
.wallet-account-menu {
  position: absolute;
  z-index: 44;
  top: calc(100% + .45rem);
  right: 0;
  min-width: 10.75rem;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(8, 15, 42, .14);
}
.wallet-account-menu button { width: 100%; padding: .7rem .8rem; border: 0; border-radius: .5rem; background: transparent; text-align: left; cursor: pointer; }
.wallet-account-menu button:hover { background: #eff9f3; }

footer[data-chrome="footer"] {
  position: relative;
  flex: 0 0 auto;
  height: auto;
  min-height: 8.5rem;
  padding: 1.25rem var(--page-gutter) 1.5rem;
  background: transparent;
  border-top: 1px solid rgba(91, 133, 116, .35);
}
footer[data-chrome="footer"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(237, 249, 241, 0), rgba(255, 255, 255, .23));
}
footer .top { height: 2.8rem; }
footer .bottom { height: 2.8rem; }

.wallet-modal[hidden] { display: none; }
.wallet-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.wallet-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 42, .56); backdrop-filter: blur(5px); }
.wallet-dialog {
  position: relative;
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.75rem;
  border: 1px solid #7ea492;
  border-radius: 1.5rem;
  background: #f7fffa;
  box-shadow: 0 2rem 7rem rgba(8, 15, 42, .24);
}
.wallet-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.wallet-dialog .eyebrow { color: var(--loss); font: 700 .72rem/1 "JetBrains Mono", monospace; letter-spacing: .13em; }
.wallet-dialog h2 { margin: .38rem 0 0; font: 700 2rem/1 "Outfit", sans-serif; }
.wallet-close { width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.wallet-privacy { margin: 1rem 0 1.2rem; color: var(--muted); line-height: 1.45; }
.wallet-dialog h3 { margin: 1rem 0 .55rem; color: #53658c; font: 700 .78rem/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.wallet-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.wallet-option { display: flex; align-items: center; gap: .75rem; min-height: 4rem; padding: .7rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; font-weight: 700; text-align: left; cursor: pointer; }
.wallet-option:hover { border-color: var(--twin); transform: translateY(-1px); }
.wallet-option img { width: 2.2rem; height: 2.2rem; border-radius: .55rem; object-fit: contain; }
.wallet-option small { display: block; margin-top: .18rem; color: var(--muted); font-weight: 500; }

.toast-region { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 110; }
.site-toast { min-width: 16rem; padding: 1rem 1.15rem; border: 1px solid #7ea492; border-radius: 1rem; background: #071525; color: #fff; box-shadow: 0 1rem 3rem rgba(8, 15, 42, .2); animation: toast-in var(--move) var(--spring) both; }
.site-toast strong { display: block; margin-bottom: .2rem; color: #6dffa6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(.75rem) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1023px) {
  body { background: var(--paper); }
  .bar { background: rgba(237, 249, 241, .9); border-color: #9db7ac; box-shadow: none; }
  .nav-mobile { background: rgba(247, 255, 250, .98); }
  .mobile-wallet-connect { grid-column: 1 / -1; width: 100%; }
  .mobile-wallet-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:.4rem}.mobile-wallet-actions[hidden]{display:none}.mobile-wallet-actions button{padding:.75rem;border:1px solid var(--line);border-radius:.65rem;background:#fff;color:var(--text);font-weight:700}
  .page-frame { width: calc(100% - 40px); margin-inline: 20px; }
  footer[data-chrome="footer"] { min-height: 0; padding: 18px 20px 22px; }
  .wallet-list { grid-template-columns: 1fr; }
  .wallet-dialog { padding: 1.25rem; border-radius: 1.2rem; }
  .toast-region { right: 1rem; bottom: 1rem; left: 1rem; }
  .site-toast { min-width: 0; }
}
/* Route art is rendered from the approved mockup asset at the mockup's slot size. */
.bridge-art img{display:block;width:100%;height:100%;object-fit:contain}
