/* Vesica — the documentation page.
   The layout the reference uses for its long-form page: an 800px block centred
   in the viewport, split into a 150px sticky contents rail and a 630px content
   column. Inside the content column, every section runs headline-left /
   body-right above a full-width grid of cards.
   Sizes are in px because they were measured off screenshots. The type here is
   small on purpose — 10px eyebrows, 12.5px body — which is what the reference
   does and what makes the page read as documentation rather than marketing. */

.dx-nav-in {
  max-width: var(--wrap-head); margin: 0 auto; padding: 0 24px;
  height: var(--nav); display: flex; align-items: center; gap: 22px;
}
.dx-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.dx-links { margin: 0 auto; display: flex; align-items: center; gap: 2px; }
.dx-links a { padding: 6px 12px; border-radius: 999px; font-size: 15.5px; font-weight: 500; color: var(--muted); transition: color .15s, background .15s; }
.dx-links a:hover { color: var(--ink); }
.dx-links a.on { background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.dx-nav-right { display: flex; align-items: center; gap: 9px; }
.dx-chip {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 13.9px; font-weight: 500; color: var(--muted);
}
.dx-chip i { display: inline-grid; place-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent-fill); color: var(--band); font-size: 11.2px; font-weight: 700; font-style: normal; letter-spacing: .04em; }

/* ---------- the page block ---------- */

.dx {
  /* 800px of content between the rail and the right edge, as measured */
  max-width: calc(var(--wrap) + 48px); margin: 0 auto; padding: 34px 24px 60px;
  display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 22px; align-items: start;
}

.dx-toc { position: sticky; top: 26px; }
.dx-toc > .k { margin-bottom: 11px; }
.dx-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.dx-toc a {
  display: block; padding: 5px 0 5px 11px; margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 13.4px; line-height: 1.35; color: var(--dim);
  transition: color .15s, border-color .15s;
}
.dx-toc a:hover { color: var(--ink); }
.dx-toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.dx-toc a em { font-style: normal; font-size: 9.9px; vertical-align: 1px; }

.dx-main { min-width: 0; }

/* ---------- hero ---------- */

.dx-top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.dx-hero h1 { margin: 0 0 16px; font-size: 42.8px; line-height: 1.12; font-weight: 600; letter-spacing: -.03em; }
.dx-hero h1 em { font-style: italic; color: var(--accent); }
.dx-hero p { margin: 0 0 22px; font-size: 15px; line-height: 1.62; color: var(--muted); max-width: 62ch; }
.dx-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- a section ---------- */

.dx-sec { padding: 40px 0; }
.dx-sec + .dx-sec { border-top: 1px solid var(--line); }
.dx-sec > .k:first-child { color: var(--accent); margin-bottom: 16px; }
.dx-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 38px; align-items: start; margin-bottom: 26px; }
.dx-head h2 { margin: 0; font-size: 32.1px; line-height: 1.16; font-weight: 600; letter-spacing: -.03em; }
.dx-head p { margin: 0; font-size: 14.4px; line-height: 1.62; color: var(--muted); }
.dx-head p a { color: var(--accent); font-weight: 500; }
.dx-head p a:hover { text-decoration: underline; }

/* ---------- cards ---------- */

.dx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
 /* the four-up is one box with hairlines between, not four cards */
.dx-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.dx-grid-4 .dx-card { border: 0; border-radius: 0; }
.dx-grid-4 .dx-card + .dx-card { border-left: 1px solid var(--line); }
.dx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dx-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 16px 16px 18px; }
.dx-card-ic { color: var(--accent); margin-bottom: 34px; }
.dx-card-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font-size: 11.8px; font-weight: 600; margin-bottom: 30px;
}
.dx-card h3 { margin: 0 0 7px; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.dx-card p { margin: 0; font-size: 13.4px; line-height: 1.6; color: var(--muted); }
.dx-card p a { color: var(--accent); }
.dx-card-dark { background: var(--band); border-color: var(--band); }
.dx-card-dark h3 { color: var(--pink); }
.dx-card-dark p { color: var(--on-band-2); }

/* the fee split */
.dx-pct { font-size: 28.9px; font-weight: 600; letter-spacing: -.03em; color: var(--accent); margin-bottom: 26px; }
.dx-card-dark .dx-pct { color: var(--accent-lift); }
.dx-flow {
  margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  padding: 13px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.dx-flow span { display: flex; align-items: center; gap: 7px; font-size: 12.8px; color: var(--muted); }
.dx-flow svg { color: var(--accent); flex: none; }
.dx-flow i { color: var(--faint); font-style: normal; }

/* the chainlink panel */
.dx-panel { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--band); border-radius: var(--r); overflow: hidden; background: var(--band); gap: 1px; }
.dx-panel > * { background: var(--band); padding: 18px 16px; }
.dx-panel-fig { grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-right: 1px solid var(--band-2); }
.dx-panel-fig svg { color: var(--pink); margin-bottom: 14px; }
.dx-panel-fig b { font-size: 42.8px; font-weight: 600; letter-spacing: -.03em; color: var(--pink); line-height: 1; }
.dx-panel-fig span { margin-top: 10px; font-size: 11.2px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-band-2); }
.dx-panel-c h3 { margin: 0 0 7px; font-size: 14.4px; font-weight: 600; color: var(--pink); display: flex; align-items: flex-start; gap: 8px; }
.dx-panel-c h3 svg { flex: none; color: var(--accent-lift); margin-top: 1px; }
.dx-panel-c p { margin: 0; font-size: 12.8px; line-height: 1.6; color: var(--on-band-2); }
.dx-panel-c:nth-child(2), .dx-panel-c:nth-child(3) { border-bottom: 1px solid var(--band-2); }
.dx-panel-c:nth-child(3), .dx-panel-c:nth-child(5) { border-left: 1px solid var(--band-2); }

/* the contracts table */
.dx-table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.dx-th, .dx-tr { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px; gap: 14px; align-items: center; padding: 10px 16px; }
.dx-th { padding-top: 0; padding-bottom: 8px; background: transparent; }
.dx-tr + .dx-tr { border-top: 1px solid var(--line-2); }
a.dx-tr { color: inherit; transition: background .15s; }
a.dx-tr:hover { background: var(--accent-soft); }
a.dx-tr:hover code { color: var(--ink); }
.dx-tr b { font-size: 13.9px; font-weight: 600; }
.dx-tr code { font-family: var(--mono); font-size: 12.3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-tr code a { color: inherit; }
.dx-ok {
  justify-self: end; display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 11.8px; font-weight: 600;
}
/* Not a badge. These addresses are generated for the mock, so the label says
   so and is styled to look like an absence rather than an achievement. */
.dx-ph {
  justify-self: end; display: inline-flex; align-items: center;
  height: 20px; padding: 0 9px; border-radius: 999px;
  background: transparent; border: 1px dashed var(--dash); color: var(--muted);
  font-family: var(--mono); font-size: 10.6px; letter-spacing: .06em; text-transform: uppercase;
}

/* code blocks */
.dx-code { border-radius: var(--r); background: var(--band); overflow: hidden; }
.dx-code .k { padding: 12px 14px 0; color: var(--on-band-2); font-size: 9.4px; line-height: 1.4; }
.dx-code pre { margin: 0; padding: 12px 14px 14px; overflow-x: auto; }
.dx-code code { font-family: var(--mono); font-size: 11.8px; line-height: 1.7; color: var(--on-band); white-space: pre; }
.dx-code .c { color: #9391B9; }
.dx-code .s { color: var(--accent-lift); }
.dx-code .n { color: var(--pink); }

/* the roadmap */
.dx-road { list-style: none; margin: 0; padding: 0; }
.dx-road li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 16px; padding-bottom: 26px; position: relative; }
.dx-road li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 1px; background: var(--line); }
.dx-road li:last-child { padding-bottom: 0; }
.dx-road li:last-child::before { display: none; }
.dx-road-ic { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--accent); }
.dx-road .k { color: var(--accent); margin-bottom: 5px; }
.dx-road h3 { margin: 0 0 6px; font-size: 17.1px; font-weight: 600; letter-spacing: -.015em; }
.dx-road p { margin: 0; font-size: 13.4px; line-height: 1.6; color: var(--muted); max-width: 62ch; }

/* faq */
.dx-faq { border-top: 1px solid var(--line); }
.dx-faq details { border-bottom: 1px solid var(--line); }
.dx-faq summary {
  list-style: none; cursor: pointer; padding: 13px 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500;
}
.dx-faq summary::-webkit-details-marker { display: none; }
.dx-faq summary::before { content: "▶"; font-size: 8.9px; color: var(--muted); transition: transform .15s; }
.dx-faq details[open] summary::before { transform: rotate(90deg); }
.dx-faq p { margin: -4px 0 14px 18px; font-size: 13.9px; line-height: 1.7; color: var(--muted); max-width: 70ch; }

/* ---------- footer ---------- */

.dx-foot { border-top: 1px solid var(--line); background: var(--card); }
.dx-foot-in { max-width: var(--wrap-head); margin: 0 auto; padding: 32px 24px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.dx-foot-in .k { margin-bottom: 11px; }
.dx-foot-in a { display: block; padding: 4px 0; font-size: 12.8px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dx-foot-in a:hover { color: var(--accent); }
.dx-fine { max-width: var(--wrap-head); margin: 0 auto; padding: 0 24px 30px; font-size: 12.3px; line-height: 1.6; color: var(--dim); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .dx-links { display: none; }
  .dx { grid-template-columns: 1fr; gap: 24px; }
  .dx-toc { position: static; }
  .dx-toc ol { columns: 2; column-gap: 22px; }
}
@media (max-width: 680px) {
  .dx, .dx-nav-in, .dx-foot-in, .dx-fine { padding-left: 16px; padding-right: 16px; }
  .dx-head { grid-template-columns: 1fr; gap: 14px; }
  .dx-hero h1 { font-size: 32.1px; }
  .dx-head h2 { font-size: 25.7px; }
  .dx-grid, .dx-grid-3, .dx-grid-4 { grid-template-columns: 1fr; }
  .dx-panel { grid-template-columns: 1fr; }
  .dx-panel-fig { grid-row: auto; border-right: 0; border-bottom: 1px solid var(--band-2); }
  .dx-panel-c:nth-child(3), .dx-panel-c:nth-child(5) { border-left: 0; }
  .dx-th, .dx-tr { grid-template-columns: 70px minmax(0, 1fr); }
  .dx-th span:last-child, .dx-ok, .dx-ph { grid-column: 2; justify-self: start; }
  .dx-toc ol { columns: 1; }
  .dx-foot-in { grid-template-columns: 1fr 1fr; }
}

/* A path to a real file in the repository, not a link: there is no public
   mirror to point at yet, and an arrow that promises source and delivers a
   scroll is worse than no arrow. */
.dx-path {
  display: inline-block; margin-top: 2px;
  font-family: var(--mono); font-size: 11.6px; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 5px; padding: 1px 6px;
}

.dx-addr { min-width: 0; overflow: hidden; }
.dx-addr .ct-addr, .dx-addr .ct-none { font-size: 11.8px; }
