/* BugLend UI v2. Light only. Seafoam is a fill or trim, never text on white.
   Palette lock: /workspace/johtodata/ops/OS/BUGLEND_BRAND_KIT.md
   Hover and locked borders stay on kit hexes. */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #ffffff;
  --foreground: #111417;
  --primary: #6FCFB0;
  --primary-foreground: #111417;
  --muted: #F3F5F7;
  --muted-foreground: #5B6770;
  --secondary-foreground: #5B6770;
  --border: #DDE3E8;
  --card: #ffffff;
  --ring: #111417;
  --ink: #111417;
  --white: #ffffff;
  --foam: #6FCFB0;
  --foam-soft: #CDEFE3;
  --silver: #EEF1F3;
  --blue: #DCEBFA;
  --blue-line: #9CC3E8;
  --secondary: #5B6770;
  --tertiary: #5B6770;
  --line: #DDE3E8;
  --surface: #F3F5F7;
  --shadow: 0 16px 40px rgba(17, 20, 23, 0.06);
  --max: 1120px;
  --gutter: 20px;
  --header: 64px;
  --strip: 36px;
  --ease: 160ms ease;
  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  hyphens: manual;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: #CDEFE3; color: var(--ink); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  border: 1px solid var(--line);
  z-index: 20;
}
.skip:focus { top: 8px; }

.wrap {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--tertiary);
}
.secondary { color: var(--secondary); }
.tertiary { color: var(--tertiary); }
.tabular { font-variant-numeric: tabular-nums; }

h1, h2, h3, p { margin: 0; }
.display {
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 72px);
  letter-spacing: -0.05em;
  line-height: 0.96;
}
.title {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.section-title {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
@media (min-width: 900px) {
  .display { font-size: 72px; }
  .title { font-size: 40px; }
  .section-title { font-size: 28px; }
}

.lede {
  color: var(--secondary);
  max-width: 46ch;
}
.fine {
  color: var(--tertiary);
  font-size: 13px;
  line-height: 1.45;
}

/* status + header */
.strip {
  height: var(--strip);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.strip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--foam);
  flex: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  background: #ffffff;
  border-bottom: 1px solid #DDE3E8;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  flex: none;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; background: #4FBD9D; object-fit: cover; flex: none; }
.nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  height: 64px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: -0.01em;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--foam);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}

.sheet {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 8px 20px 20px;
}
.sheet.open { display: block; }
.sheet a {
  display: flex;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 16px;
}
.sheet a:last-child { border-bottom: 0; }
.sheet a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--foam); padding-left: 12px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease);
}
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--foam);
  color: var(--ink);
}
.btn-primary:hover {
  background: #7FD6BC;
}
.btn-ghost {
  background: var(--white);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* chips, identity */
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.mono {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--white);
  color: var(--ink);
  flex: none;
}
.ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ident b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ident > span:not(.mono) { display: grid; gap: 1px; min-width: 0; }
.ident span { font-size: 12px; color: var(--tertiary); font-weight: 400; }
.ident > .mono {
  display: inline-flex;
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
}

/* hero */
.hero {
  display: grid;
  gap: 40px;
  padding: 48px 0 56px;
  align-items: center;
}
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.hero-copy .lede { font-size: 17px; line-height: 1.55; max-width: 38ch; }
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
    gap: 80px;
    padding: 104px 0 88px;
  }
  .hero-copy { gap: 24px; }
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel-pad { padding: 20px; }
.quote-app .field { margin: 0; }
.quote-app .field input { font-weight: 600; }
.hero-card {
  box-shadow: 0 24px 60px rgba(17, 20, 23, 0.06), inset 0 3px 0 var(--foam);
  padding: 20px 20px 22px;
  display: grid;
  gap: 16px;
  border-radius: 20px;
}
.hero-card-top, .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-radius: 999px;
}
.seg a, .seg button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.seg a[aria-current="true"], .seg a:hover { background: var(--white); color: var(--ink); }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.metric { background: var(--white); padding: 14px 14px 12px; }
.metric .label { margin-bottom: 10px; }
.metric strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--tertiary);
}
.metric .fine { display: block; margin-top: 6px; }
.track {
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.track i { display: block; height: 100%; width: 0; background: var(--foam); }
.track-cap { display: flex; justify-content: space-between; gap: 12px; }

/* facts + sections */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { padding: 18px 0; }
@media (max-width: 899px) {
  .fact:nth-child(odd) { padding-right: 16px; }
  .fact:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.fact b {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .fact { padding: 26px 28px; }
  .fact:first-child { padding-left: 0; }
  .fact + .fact { border-left: 1px solid var(--line); }
}

.section { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.split3 {
  display: grid;
  border-top: 1px solid var(--line);
}
.split3 article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.split3 h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.split3 p { color: var(--secondary); font-size: 14px; line-height: 1.5; }
@media (min-width: 900px) {
  .section { padding: 64px 0; }
  .split3 { grid-template-columns: repeat(3, 1fr); }
  .split3 article { padding: 28px 28px 8px 0; border-bottom: 0; }
  .split3 article + article { padding-left: 28px; border-left: 1px solid var(--line); }
}

.callout {
  background: var(--foam-soft);
  border-radius: 12px;
  border: 1px solid var(--foam);
  box-shadow: inset 3px 0 0 var(--foam);
  padding: 20px 20px 20px 22px;
  display: grid;
  gap: 8px;
}
.callout p { color: var(--secondary); font-size: 14px; max-width: 68ch; }
.callout a { font-weight: 600; font-size: 14px; }

/* tables + market cards */
.table-wrap {
  display: none;
  background: #ffffff;
  border: 1px solid #DDE3E8;
  border-radius: 12px;
  overflow: hidden;
  padding: 12px 8px 4px;
}
table.data th, table.data td { background: #ffffff; }
.market-cards { display: grid; gap: 10px; }
.mcard {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: var(--white);
}
.mcard:hover { background: var(--surface); }
.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.mgrid span { display: block; }
.mgrid b { font-weight: 600; font-size: 14px; }
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line);
}
table.data td {
  height: 60px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
table.data tr:hover td { background: var(--surface); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data a.rowlink { font-weight: 600; letter-spacing: -0.01em; }
@media (min-width: 900px) {
  .table-wrap { display: block; }
  .market-cards { display: none; }
}

.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters button[aria-pressed="true"] {
  background: var(--foam);
  color: var(--ink);
  border-color: var(--foam);
}

/* forms */
.page-head { padding: 36px 0 8px; display: grid; gap: 8px; }
.page-head .lede { font-size: 15px; }
@media (min-width: 900px) {
  .page-head { padding: 48px 0 12px; }
}

.work {
  display: grid;
  gap: 16px;
  padding-bottom: 64px;
}
@media (min-width: 900px) {
  .work { grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 24px; align-items: start; }
}

.form, .summary { padding: 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field .hint { font-size: 13px; color: var(--tertiary); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 0 14px;
  font-weight: 600;
  font-size: 14px;
}
textarea { height: 120px; padding: 12px 14px; resize: vertical; font-weight: 400; }
input:hover, select:hover, textarea:hover { border-color: #6FCFB0; }
.amount {
  height: 64px;
  font-size: 32px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.dl { display: grid; gap: 0; }
.dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.dl dt { color: var(--tertiary); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; font-weight: 600; text-align: right; }

.empty {
  padding: 48px 24px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.empty h2 { font-size: 20px; letter-spacing: -0.02em; }
.empty p { color: var(--secondary); max-width: 42ch; font-size: 14px; }
.ring {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.ring i {
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  display: block;
}

/* docs */
.docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 28px 0 72px;
  min-width: 0;
}
.prose { display: grid; gap: 16px; max-width: 640px; min-width: 0; }
.docs > * { min-width: 0; }
.prose p, .prose li, .prose h1, .prose h2 { overflow-wrap: anywhere; }
.rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; min-width: 0; max-width: 100%; }
.rail a {
  flex: none;
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
}
.rail a[aria-current="page"], .rail a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--foam);
  border-radius: 0;
  border-color: transparent;
}
.prose { display: grid; gap: 16px; max-width: 640px; min-width: 0; }
.prose h1 { margin-top: 8px; }
.prose h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin-top: 12px; }
.prose p, .prose li { color: var(--secondary); font-size: 15px; }
.prose ul, .prose ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.prose a { font-weight: 600; box-shadow: inset 0 -1px 0 var(--line); }
.toc { display: none; }
.toc a { display: block; font-size: 13px; font-weight: 600; color: var(--tertiary); padding: 6px 0; }
.toc a:hover { color: var(--ink); }
@media (min-width: 900px) {
  .docs {
    grid-template-columns: 200px minmax(0, 640px);
    gap: 48px;
    align-items: start;
    padding-top: 40px;
  }
  .docs.with-toc { grid-template-columns: 200px minmax(0, 640px) 160px; }
  .rail {
    display: grid;
    gap: 2px;
    position: sticky;
    top: 88px;
    overflow: visible;
    padding: 0;
  }
  .rail .rail-label { margin: 16px 0 6px; }
  .rail a {
    height: 34px;
    border: 0;
    border-radius: 8px;
    justify-content: flex-start;
    padding: 0 10px;
  }
  .rail a[aria-current="page"], .rail a[aria-current="true"] {
    background: var(--surface);
    box-shadow: inset 2px 0 0 var(--foam);
    border-radius: 8px;
  }
  .toc { display: block; position: sticky; top: 88px; }
}

/* wallet modal */
.wallet-layer { display: none; }
.wallet-layer[hidden] { display: none !important; }
body.has-modal .wallet-layer:not([hidden]) { display: block; }
input::placeholder, textarea::placeholder { color: var(--tertiary); }
tr.group td {
  height: 44px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
  background: var(--white);
}
tr.group:hover td { background: var(--white); }
.group-label { margin: 8px 0 0; }
@media (min-width: 900px) {
  .summary { position: sticky; top: 88px; }
}
body.has-modal { overflow: hidden; }
.wallet-back {
  position: fixed;
  inset: 0;
  background: rgba(241, 243, 245, 0.78);
  z-index: 40;
}
body.has-modal .page { filter: blur(6px); }
.dialog {
  position: fixed;
  z-index: 50;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 32px));
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: calc(100% - 32px);
  overflow-y: auto;
}
.dialog-band {
  background: var(--foam-soft);
  border-bottom: 1px solid var(--foam);
  height: 104px;
  display: grid;
  place-items: center;
}
.dialog-mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.dialog-mark img { width: 56px; height: 56px; border-radius: 12px; background: #4FBD9D; object-fit: cover; }
.dialog-body { padding: 22px 22px 20px; display: grid; gap: 14px; }
.dialog-body h2 { font-size: 20px; letter-spacing: -0.02em; }
.dialog-body p { font-size: 14px; color: var(--secondary); }
.wallets { display: grid; gap: 8px; }
.wallet {
  height: 56px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
  font-weight: 600;
}
.wallet:hover { background: var(--surface); }
.wallet small { display: block; font-weight: 400; color: var(--tertiary); font-size: 12px; }
.wallet .go { margin-left: auto; color: var(--tertiary); font-weight: 400; }
.checkwell {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.45;
}
.checkwell input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--foam); }
.notice {
  display: none;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
}
.notice.show { display: block; }

.footer {
  background: #CDEFE3;
  border-top: 1px solid #6FCFB0;
  padding: 36px 0 48px;
  color: #111417;
}
.footer-grid {
  display: grid;
  gap: 24px;
}
.footer h2 { font-size: 15px; letter-spacing: -0.02em; margin-bottom: 8px; color: #111417; }
.footer a, .footer li { font-size: 14px; color: #5B6770; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: #111417; }
.legal-line { margin-top: 28px; padding-top: 16px; border-top: 1px solid #6FCFB0; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr; }
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tertiary); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 8px; color: var(--secondary); font-size: 14px; max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Pass 2. Stage, placeholders, app pages, wallet marks. */

.stage {
  position: relative;
  background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
}
@media (max-width: 899px) {
  .stage {
    background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
  }
}
.hero-copy .lede { font-size: 17px; line-height: 1.5; }
.seg a[aria-current="true"] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 20, 23, 0.06);
}
.ph {
  color: var(--tertiary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
}
table.data td.num { color: var(--tertiary); font-weight: 600; font-size: 13px; }
table.data a.rowlink { color: var(--ink); }
table.data a.rowlink:hover { box-shadow: inset 0 -1px 0 var(--ink); }

.step-no {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.app {
  background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
  padding-bottom: 28px;
}
.amount-wrap { position: relative; }
.amount-wrap .amount { padding-right: 78px; width: 100%; }
.unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--tertiary);
  letter-spacing: 0.04em;
  pointer-events: none;
}
.locked {
  height: 44px;
  border: 1px dashed #DDE3E8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--tertiary);
  font-weight: 600;
  font-size: 14px;
  background: var(--surface);
}
.card-rule { box-shadow: inset 0 3px 0 var(--foam); }
.summary.card-rule { border-radius: 16px; }
.form { border-radius: 16px; gap: 18px; padding: 22px; }
.summary { border-radius: 16px; padding: 22px; }

.empty-mark { width: 48px; height: 48px; display: block; }
.positions .empty { min-height: 280px; align-content: center; }
.schema { padding: 22px; display: grid; gap: 12px; align-content: start; }
.schema .section-title { margin-bottom: 4px; }

.wmark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  flex: none;
}
.wmark svg, .wmark img { width: 22px; height: 22px; display: block; object-fit: contain; }
.wallet.is-disabled,
.wallet[aria-disabled="true"] {
  cursor: default;
  opacity: 0.72;
}
.wallet.is-disabled:hover,
.wallet[aria-disabled="true"]:hover { background: var(--white); }
.wallet.is-on {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--surface);
}
.brand-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.brand-lock img { width: 28px; height: 28px; border-radius: 6px; background: #4FBD9D; object-fit: cover; }
.brand-lock h2 { margin: 0; }

.mcard .ph-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--tertiary);
}
.mcard .ph-line b { color: var(--ink); font-weight: 600; }

.page-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}
.page-intro span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary);
}
.silver-band {
  background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
  padding-top: 8px;
  padding-bottom: 8px;
}
.note-blue {
  background: #DCEBFA;
  border: 1px solid #9CC3E8;
  border-radius: 12px;
  padding: 16px;
}
.note-blue h3, .note-blue .label { color: #111417; }
.note-blue p { color: #5B6770; }

.bug-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  font-family: Montserrat, sans-serif;
}
.bug-launcher {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 18px;
  background: #7FD6BC;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 8px 24px rgba(17, 20, 23, 0.12);
}
.bug-launcher .bug-mark {
  background: transparent;
  width: auto;
  height: auto;
  font-size: 20px;
}
.bug-launcher-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.bug-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #7FD6BC;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.bug-panel {
  position: fixed;
  right: 20px;
  bottom: 104px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 128px);
  overflow: auto;
  background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
  border: 1px solid #DDE3E8;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(17, 20, 23, 0.12);
  display: grid;
  gap: 8px;
  z-index: 41;
}
.bug-panel[hidden] { display: none; }
.bug-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bug-panel-head div { display: grid; min-width: 0; }
.bug-panel-head strong { color: #111417; font-size: 14px; }
.bug-panel-head span { color: #5B6770; font-size: 11px; }
.bug-panel-head button {
  margin-left: auto;
  border: 1px solid #DDE3E8;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  color: #111417;
  cursor: pointer;
}
.bug-intro { margin: 0; color: #111417; font-size: 13px; line-height: 1.45; }
.bug-fine { margin: 0; color: #5B6770; font-size: 11px; line-height: 1.4; }
.bug-modes { display: flex; gap: 8px; }
.bug-modes button {
  flex: 1;
  border: 1px solid #DDE3E8;
  background: #ffffff;
  color: #111417;
  border-radius: 999px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bug-modes button[aria-pressed="true"] {
  background: #6FCFB0;
  border-color: #6FCFB0;
  color: #111417;
}
.bug-form { display: grid; gap: 8px; }
.bug-form[hidden] { display: none; }
.bug-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #111417; }
.bug-form input, .bug-form select {
  width: 100%;
  border: 1px solid #DDE3E8;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: #111417;
}
.bug-actions { display: flex; gap: 8px; }
.bug-actions .btn { flex: 1; }
.bug-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bug-cards[hidden] { display: none; }
.bug-card {
  background: #ffffff;
  border: 1px solid #DDE3E8;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.bug-card strong { font-size: 16px; color: #111417; }
.bug-card p { margin: 0; color: #5B6770; font-size: 11px; }
.bug-asset { color: #111417 !important; font-weight: 600; }
.bug-card button {
  margin-top: 4px;
  border: 0;
  background: #6FCFB0;
  color: #111417;
  border-radius: 999px;
  padding: 7px 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bug-card button[aria-pressed="true"] { outline: 2px solid #111417; }
.bug-cards > .bug-fine { grid-column: 1 / -1; }

.bug-launcher {
  width: 84px;
  height: 84px;
  padding: 6px;
  border: 2px solid #6FCFB0;
  border-radius: 22px;
  background: #ffffff;
  color: #111417;
  overflow: hidden;
  animation: launcher-pulse 2.6s ease-in-out infinite;
}
@keyframes launcher-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(17, 20, 23, 0.12); }
  50% { box-shadow: 0 10px 28px rgba(111, 207, 176, 0.55); }
}
.bug-face {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.bug-face-sm {
  width: 40px;
  height: 48px;
  flex: none;
}
.quote-bug {
  width: 36px;
  height: 44px;
  object-fit: contain;
}
.bank-open { align-items: center; }
.bank-hero {
  width: min(220px, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
}
.bank-hero-card {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: linear-gradient(180deg, #F1F3F5 0%, #FAFBFC 30%, #ECEFF2 100%);
}
[data-bank-app][hidden],
[data-bank-gate][hidden] { display: none !important; }
.bank-chat { display: grid; gap: 10px; align-content: start; }
.bank-chat-head { display: flex; align-items: center; gap: 8px; }
.bank-chat-head img { width: 48px; height: 56px; object-fit: contain; }
.bank-chat-head strong { color: #111417; }
.bank-thread {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}
.bank-msg {
  margin: 0;
  background: #ffffff;
  border: 1px solid #DDE3E8;
  border-radius: 12px;
  padding: 10px 12px;
  color: #111417;
  font-size: 14px;
}
.bank-msg.is-user { background: #CDEFE3; }
.bank-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.bank-quick button,
.bank-chat form {
  font: inherit;
}
.bank-quick button {
  border: 1px solid #DDE3E8;
  background: #ffffff;
  color: #111417;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.bank-chat form { display: flex; gap: 8px; }
.bank-chat form input {
  flex: 1;
  border: 1px solid #DDE3E8;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: #111417;
}
.bank-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bank-log li {
  background: #ffffff;
  border: 1px solid #DDE3E8;
  border-radius: 12px;
  padding: 10px 12px;
  color: #111417;
}
.bank-log-card { margin: 16px 0; display: grid; gap: 10px; }
.brand img, .brand-lock img, .dialog-mark img { object-fit: cover; }

/* Header Login is a text link, not a pill. Hue is brand blue #9CC3E8
   (src: /workspace/johtodata/ops/OS/BUGLEND_BRAND_KIT.md). That hex is 1.84:1
   on white, so the glyph uses the same hue darkened to #2C77BE (4.68:1). */
.header-login {
  color: #2C77BE;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  height: auto;
  min-height: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.header-login:hover {
  color: #25629D;
  text-decoration: underline;
}
.header-login:focus-visible {
  outline: 2px solid #2C77BE;
  outline-offset: 3px;
  text-decoration: underline;
}
.header-login[aria-current="page"] {
  text-decoration: underline;
}
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 4px; }
  .header .btn { padding: 0 12px; }
}

.quote-app {
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: stretch;
  gap: 4px;
}
.bug-live.quote-mascot {
  width: 168px;
  height: 197px;
  justify-self: center;
  overflow: visible;
}
.quote-mascot::after { content: none; }
.quote-body { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 720px) {
  .quote-app { grid-template-columns: 1fr; }
  .bug-live.quote-mascot { width: 140px; height: 164px; aspect-ratio: auto; }
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  min-height: 100vh;
  background: #ffffff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.splash-bug {
  position: absolute;
  width: 180px;
  height: auto;
  left: -200px;
  top: 18%;
  z-index: 2;
  animation: bug-walk 2.6s ease-in-out forwards;
  transform-origin: center center;
  filter: drop-shadow(0 16px 18px rgba(17, 20, 23, 0.08));
}
.bug-live {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 640 / 752;
}
.splash-bug.bug-live {
  width: 180px;
  height: 211px;
}
.bug-live:not(.splash-bug) { animation: bug-breathe 2.6s ease-in-out infinite; }
.splash-bug.bug-live { position: absolute; }
.bug-launcher .bug-live { width: 100%; height: 100%; overflow: hidden; }
.bug-live-sm { width: 40px; height: 47px; flex: none; overflow: hidden; animation-duration: 2.2s; }
.bug-live img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  pointer-events: none;
}
.bug-head { transform-origin: 50% 78%; z-index: 2; }
.bug-body { z-index: 1; }
@keyframes bug-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.bug-pop {
  position: fixed;
  right: 118px;
  bottom: 52px;
  max-width: 210px;
  background: #ffffff;
  border: 1px solid #DDE3E8;
  border-radius: 14px;
  padding: 8px 12px;
  color: #111417;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(17, 20, 23, 0.1);
  z-index: 45;
}
.bug-pop[hidden] { display: none; }
.bug-panel-head .bug-pop {
  position: relative;
  right: auto;
  bottom: auto;
  max-width: 140px;
  z-index: 2;
}
.bug-widget.is-open > .bug-pop { display: none; }
.bug-pop.is-pop { animation: bubble-pop 0.35s ease both; }
@keyframes bubble-pop {
  0% { transform: translateY(6px) scale(0.86); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.splash.is-settled .splash-bug { animation: none; }
@keyframes bug-walk {
  0% { left: -180px; top: 22%; transform: translateY(0) rotate(-6deg); }
  15% { transform: translateY(-10px) rotate(-2deg); }
  30% { transform: translateY(0) rotate(4deg); }
  45% { transform: translateY(-10px) rotate(-4deg); }
  62% { left: 58%; top: 16%; transform: translateY(0) rotate(7deg); }
  78% { left: 46%; top: 12%; transform: translateY(-6px) rotate(-8deg); }
  100% { left: calc(50% - 90px); top: 4%; transform: translateY(0) rotate(0deg); }
}
.splash-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 220px 20px 48px;
}
.splash-title {
  margin: 0;
  color: #111417;
  font-weight: 800;
  font-size: clamp(56px, 10vw, 96px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  animation: bug-drop 0.9s 2.15s both;
}
@keyframes bug-drop {
  0% { transform: translateY(-140px); opacity: 0; }
  55% { transform: translateY(0); opacity: 1; }
  72% { transform: translateY(-18px); }
  86% { transform: translateY(0); }
  94% { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}
.splash-sub {
  min-height: 28px;
  margin: 0;
  color: #9AA3AB;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.splash-actions {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.splash-actions.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.splash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  background: #6FCFB0;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.splash-btn:hover { filter: brightness(0.97); }
.splash-btn:active { transform: scale(0.96); }
.splash.is-settled .splash-title { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .splash-bug, .splash-title, .bug-launcher { animation: none; }
  .splash-bug { left: calc(50% - 90px); top: 4%; }
  .splash-actions { opacity: 1; transform: none; pointer-events: auto; }
}

/* Pass 3. Type rhythm, product card, original mascot rig. */
@media (max-width: 720px) {
  .hero-copy .lede { padding-right: 112px; }
}
.fact b { font-size: 18px; font-weight: 800; }
.split3 h3 { font-size: 18px; font-weight: 800; }
.section { padding: 56px 0; }
@media (min-width: 900px) {
  .section { padding: 80px 0; }
}
.btn:active { transform: scale(0.98); }
html.bug-rig .bug-live:not(.splash-bug) { animation: none; }
.bug-rig {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 69.68%;
  transform-origin: 50% 78%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}
.bug-body { transform-origin: 50% 28%; will-change: transform; }
.bug-eyes { position: absolute; inset: 0; z-index: 3; }
.bug-eye {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #111417;
  overflow: hidden;
  translate: -50% -50%;
}
.bug-eye-l { width: 18.2%; left: 13.8%; top: 70%; }
.bug-eye-r { width: 23.5%; left: 52%; top: 68%; }
.bug-eye::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: #ffffff;
}
.bug-pupil {
  position: absolute;
  width: 62%;
  height: 62%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: #111417;
  z-index: 1;
  will-change: transform;
}
.bug-pupil::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 34%;
  left: 20%;
  top: 14%;
  border-radius: 50%;
  background: #ffffff;
}
.bug-lid {
  position: absolute;
  inset: -2%;
  background: #DCEDE2;
  border-radius: 46% 46% 42% 42%;
  transform: scaleY(0);
  transform-origin: 50% 0%;
  box-shadow: inset 0 -2px 0 #111417;
  z-index: 2;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .bug-live, .bug-rig, .bug-body, .bug-head { animation: none !important; }
}
