/* =========================================================================
   Decessor: shared styles
   Palette: mint #DCEFEA, peach #F2E3D8 (one accent per screen), deep teal
   #04161C, mid teal #0E3C48. The background gradient alone uses the pale
   aqua #CFE4EA and the tones between it and deep teal.
   ========================================================================= */

:root {
  --mint: #DCEFEA;
  --peach: #F2E3D8;
  --deep: #04161C;
  --mid: #0E3C48;
  --aqua: #CFE4EA;

  --mint-rgb: 220, 239, 234;
  --mid-rgb: 14, 60, 72;
  --deep-rgb: 4, 22, 28;

  --text: var(--mint);
  --text-dim: rgba(var(--mint-rgb), .84);
  --text-faint: rgba(var(--mint-rgb), .7);
  --line: rgba(var(--mint-rgb), .16);
  --line-strong: rgba(var(--mint-rgb), .42);
  --panel: rgba(var(--mid-rgb), .35);
  --panel-solid: rgba(var(--deep-rgb), .62);

  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --radius: 12px;
  --header-h: 64px;
  --measure: 600px;
  --wide: 1280px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: dark;
}

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

/* ------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;

  /* Out-of-focus teal: pale misty aqua top-left, near-black teal bottom-right.
     Desktop keeps it fixed to the viewport, like a photograph behind the page. */
  /* The mist and the bright cyan stay in the top-left and lower-left corners; every tone of
     the base gradient keeps mint text above 4.5:1. */
  background-color: var(--deep);
  background-image:
    radial-gradient(ellipse 60vmax 46vmax at 0% 0%,
      rgba(207, 228, 234, 1) 0%,
      rgba(190, 226, 233, .88) 16%,
      rgba(124, 200, 222, .5) 36%,
      rgba(40, 152, 186, .18) 56%,
      rgba(40, 152, 186, 0) 74%),
    radial-gradient(ellipse 44vmax 38vmax at 0% 82%,
      rgba(36, 150, 184, .26) 0%,
      rgba(2, 115, 147, .12) 48%,
      rgba(2, 115, 147, 0) 74%),
    linear-gradient(122deg, #075f7c 0%, #04536c 24%, #02455b 44%, #012d3b 64%, #031a24 82%, #04161c 100%);
  background-attachment: fixed;
}

/* Grain: a few percent of monochrome noise so the gradient reads as photographic. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Mobile and touch: the background scrolls with the document (fixed backgrounds are
   unreliable there). The glow stays sized to the first screen; the page deepens below. */
@media (max-width: 899px), (hover: none) {
  body {
    background-attachment: scroll;
    background-image:
      radial-gradient(ellipse 110vw 40svh at 0% 0%,
        rgba(207, 228, 234, 1) 0%,
        rgba(190, 226, 233, .86) 14%,
        rgba(150, 210, 226, .6) 30%,
        rgba(80, 172, 200, .24) 40%,
        rgba(40, 152, 186, .06) 50%,
        rgba(40, 152, 186, 0) 62%),
      radial-gradient(ellipse 90vw 40svh at 0% 96svh,
        rgba(36, 150, 184, .3) 0%,
        rgba(36, 150, 184, 0) 72%),
      linear-gradient(168deg, #075f7c 0, #04536c 60svh, #02455b 170svh, #013848 300svh, #012d3b 460svh, #031a24 640svh, #04161c 100%);
  }
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(ul, ol)[role='list'] { list-style: none; padding: 0; margin: 0; }

::selection { background: var(--mint); color: var(--deep); }

:focus-visible {
  outline: 1px solid var(--mint);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--deep);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* -------------------------------------------------------- typography */

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.big {
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  text-wrap: balance;
}

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--mint); }

.dim { color: var(--text-dim); }

code, kbd, samp, pre {
  font-family: var(--mono);
  font-size: .88em;
  /* Code must read verbatim: no ligatures turning -> into an arrow or != into a symbol. */
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'calt' 0;
}

:not(pre) > code {
  padding: .08em .36em;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}

/* ------------------------------------------------------------ shapes */

.marker {
  flex: none;
  display: inline-block;
  width: 14px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  transform: rotate(-32deg);
}
.marker--peach { background: var(--peach); }
.marker--lg { width: 22px; height: 14px; }

/* ----------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }

main { display: block; }

/* ----------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--mint);
  border-radius: 999px;
  background: transparent;
  color: var(--mint);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.btn:hover,
.btn--primary:focus-visible {
  background: var(--mint);
  color: var(--deep);
}

.btn--ghost { border-color: transparent; }
.btn--ghost:hover { background: transparent; color: var(--mint); border-color: var(--mint); }

.btn--small {
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: .5;
  background: transparent;
  color: var(--mint);
}

.x-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--mint);
  border-radius: 50%;
  color: var(--mint);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.x-btn svg { width: 16px; height: 16px; fill: currentColor; }
.x-btn:hover { background: var(--mint); color: var(--deep); }

/* ------------------------------------------------------------ panels */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--mint);
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'calt' 0;
  tab-size: 2;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.code code { font-size: inherit; }
.code .c { color: var(--text-faint); }

/* -------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
}
/* Transparent header, 8px backdrop blur. The blur lives on its own layer with a soft lower edge,
   so it never draws a line across the gradient behind it. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .3s var(--ease);
}
.brand__mark { width: 32px; height: 32px; border-radius: 50%; }
.site-header .brand { color: var(--mint); }
.site-header .ink-deep,
.site-nav a.ink-deep:not(.x-btn) { color: var(--deep); }
.site-nav .x-btn.ink-deep { color: var(--deep); border-color: var(--deep); }
.site-nav .x-btn.ink-deep:hover { background: var(--deep); color: var(--mint); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav a:not(.x-btn) {
  color: var(--mint);
  font-size: 16px;
  text-decoration: none;
  padding: 6px 0;
}
.site-nav a:not(.x-btn):hover,
.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

@media (max-width: 380px) {
  .brand { font-size: 17px; gap: 8px; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.x-btn) { font-size: 15px; }
}

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

.site-footer {
  margin-top: clamp(96px, 14vh, 160px);
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 15px;
}

.site-footer__inner {
  display: grid;
  gap: 28px;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 40px var(--gutter) 48px;
}

.brand--footer { color: var(--mint); font-size: 16px; }
.brand--footer .brand__mark { width: 28px; height: 28px; }
.site-footer__tagline { margin: 8px 0 0; }

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}
.site-footer__nav a:not(.x-btn) { color: var(--mint); text-decoration: none; padding: 6px 0; }
.site-footer__nav a:not(.x-btn):hover { text-decoration: underline; }

.site-footer__meta p { margin: 0; }

@media (min-width: 820px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 48px;
  }
  .site-footer__meta { text-align: right; }
}

/* -------------------------------------------------------- reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================== LANDING */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 24px) var(--gutter) 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero__shoal {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2.4s var(--ease);
}
.hero__shoal.is-ready { opacity: 1; }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
}

.hero__title { margin-bottom: 36px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero__line {
  margin: 28px auto 0;
  color: var(--text-dim);
}

.hero__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  margin: 16px auto 0;
  color: var(--mint);
  font-size: 15px;
}
.hero__notice:empty { visibility: hidden; }
.hero__notice a:not(.x-btn) { color: var(--mint); }

.hero__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  max-width: none;
  justify-content: center;
  text-align: center;
  color: var(--mint);
}

.section {
  padding-block: clamp(88px, 15vh, 168px);
}

.section__head { margin-bottom: 28px; }
.section__head .label { margin-bottom: 22px; }
.section .big { margin-bottom: 28px; }

.steps {
  display: grid;
  gap: 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.step .label { margin-bottom: 12px; }
.step p { color: var(--text-dim); font-size: 16px; }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

.figure {
  margin: 0 auto 32px;
}
.figure img {
  width: 100%;
  border-radius: var(--radius);
}

.rows {
  margin: 32px 0;
  border-top: 1px solid var(--line);
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.row dt {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.row dd { margin: 0 0 0 auto; color: var(--text-dim); text-align: right; }

.pending { color: var(--text-dim); }

.address {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.address__link {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  color: var(--mint);
}

.cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.cta p { flex: 1; margin: 0; }

.risks {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.risks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.risks .marker { margin-top: 9px; }
.risks strong { font-weight: 500; }

.closing {
  padding-block: clamp(120px, 22vh, 220px) clamp(40px, 8vh, 80px);
  text-align: center;
}
.closing .big { margin: 0 auto; }
.closing__ellipse {
  width: 92px;
  height: 56px;
  margin: 48px auto 40px;
  border-radius: 50%;
  background: var(--peach);
  transform: rotate(-32deg);
}
.closing .x-btn { margin: 0 auto; }

/* ============================================================== DOCS */

.docs {
  display: grid;
  gap: 40px;
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
}

.docs-toc {
  position: relative;
  z-index: 5;
}

.docs-toc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--mint);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.docs-toc__toggle::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.docs-toc__toggle[aria-expanded='true']::after { transform: translateY(2px) rotate(-135deg); }

.docs-nav {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}
.js .docs-nav:not(.is-open) { display: none; }

.docs-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}
.docs-nav a::before {
  content: '';
  flex: none;
  width: 8px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: rotate(-32deg);
  transition: opacity .2s var(--ease);
}
.docs-nav a:hover { color: var(--mint); }
.docs-nav a[aria-current] { color: var(--mint); }
.docs-nav a[aria-current]::before { opacity: 1; }
.docs-nav__sep {
  margin: 8px 10px;
  border-top: 1px solid var(--line);
}

@media (min-width: 960px) {
  .docs {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(48px, 7vw, 120px);
    padding-top: 40px;
  }
  .docs-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
  }
  .docs-toc__toggle { display: none; }
  .js .docs-nav:not(.is-open),
  .docs-nav { display: block; margin-top: 0; }
}

.docs-article {
  min-width: 0;
  max-width: 720px;
}

.docs-intro { padding-bottom: 24px; }
.docs-intro .big { margin: 18px 0 20px; }
.updated {
  color: var(--text-dim);
  font-size: 14px;
}

.doc-section {
  padding: 56px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.doc-section:first-of-type { margin-top: 24px; }
.doc-section > h2 {
  margin-bottom: 20px;
  font-weight: 300;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}
.doc-section > .label { margin-bottom: 14px; }
.doc-section h3 {
  margin: 32px 0 10px;
  font-weight: 500;
  font-size: 18px;
}
.doc-section ul,
.doc-section ol:not(.steps) {
  max-width: var(--measure);
  margin: 0 0 1em;
  padding-left: 1.2em;
}
.doc-section li { margin-bottom: .5em; }
.doc-section li::marker { color: var(--text-faint); }
.doc-section .code { margin: 20px 0 24px; }
.doc-section table {
  width: 100%;
  margin: 20px 0 24px;
  border-collapse: collapse;
  font-size: 15px;
}
.doc-section th,
.doc-section td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.doc-section th {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.table-wrap { overflow-x: auto; }

.note {
  max-width: var(--measure);
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 16px;
}
.note .label { margin-bottom: 8px; }

.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  transform: rotate(-32deg);
  transition: background-color .2s var(--ease);
}
.faq details[open] summary::after { background: var(--mint); }
.faq details > div { padding: 0 0 20px; }

.docs-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.announce {
  margin: 56px 0 0;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}
.announce .label { justify-content: center; max-width: none; }
.announce .big {
  text-transform: none; /* keeps the X in "announced on X only" */
  max-width: 18ch;
  margin: 20px auto 32px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.announce .x-btn { margin: 0 auto; }
.warning {
  max-width: var(--measure);
  margin: 24px auto 0;
  color: var(--text-dim);
  font-size: 15px;
}

/* =========================================================== SANDBOX */

.sandbox-intro { padding-block: clamp(88px, 13svh, 128px) 8px; }
/* Desktop: page intros sit centred, clear of the pale glow in the top-left corner. */
@media (min-width: 900px) {
  .sandbox-intro { padding-top: 56px; text-align: center; }
  .sandbox-intro > * { margin-inline: auto; }
  .sandbox-intro .label, .sandbox-intro .btn-row { justify-content: center; }
  .sandbox-intro .note { text-align: left; }
}
.sandbox-intro .big { margin: 16px 0 16px; }

.sandbox {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 24px auto 0;
  padding-inline: var(--gutter);
}

.sandbox__main,
.sandbox__aside {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

@media (min-width: 1024px) {
  .sandbox { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
  .sandbox__aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    align-self: start;
  }
}

fieldset.card { margin: 0; min-width: 0; }
fieldset.card[disabled] { opacity: .55; }
.btn-row--spaced { margin-bottom: 20px; }
.hint--after { margin-top: 12px; }

.card {
  padding: 20px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.card > .label { margin-bottom: 16px; }
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card__head .label { margin: 0; }
.card p { font-size: 15px; }
.hint { color: var(--text-dim); font-size: 14px; }

.wallet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.wallet-id {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin-right: auto;
}
.wallet-id__name { font-size: 17px; overflow-wrap: anywhere; }
.wallet-id__meta { color: var(--text-dim); font-size: 14px; }
.wallet-msg { margin: 12px 0 0; color: var(--text-dim); font-size: 14px; }
.wallet-msg:empty { display: none; }

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.segmented legend { margin-bottom: 12px; padding: 0; }
.segmented label { position: relative; }
.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.segmented input:checked + span { background: var(--mint); color: var(--deep); border-color: var(--mint); }
.segmented input:focus-visible + span { outline: 1px solid var(--mint); outline-offset: 3px; }
.segmented input:disabled + span { opacity: .4; }
.segmented input:disabled { cursor: not-allowed; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 14px; }
.field > label,
.field-label {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.input-row { display: flex; gap: 8px; min-width: 0; }
.input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(var(--deep-rgb), .4);
  font-family: var(--mono);
  font-size: 14px;
}
.input::placeholder { color: var(--text-faint); }
.input:focus-visible { outline: 1px solid var(--mint); outline-offset: 2px; border-color: var(--mint); }
.input[aria-invalid='true'] { border-color: var(--peach); }
.field-error { margin: 0; color: var(--peach); font-size: 13px; }
.field-error:empty { display: none; }

.icon-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--mint);
  font-size: 13px;
  letter-spacing: .06em;
}
.icon-btn:hover { border-color: var(--mint); }

.range-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.range-value { font-size: 15px; color: var(--mint); }

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 4px 0 0;
  background: transparent;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--line-strong);
}
input[type='range']::-moz-range-track {
  height: 1px;
  background: var(--line-strong);
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 14px;
  margin-top: -7px;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
}
input[type='range']:focus-visible { outline: none; }
input[type='range']:focus-visible::-webkit-slider-thumb { outline: 1px solid var(--mint); outline-offset: 3px; }
input[type='range']:focus-visible::-moz-range-thumb { outline: 1px solid var(--mint); outline-offset: 3px; }

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

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) {
  .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.actions .btn { width: 100%; padding: 0 10px; }
.why {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
  font-size: 13px;
}
.why li { display: flex; gap: 8px; padding: 2px 0; }
.why b { min-width: 58px; font-weight: 500; color: var(--mint); }
.why code { white-space: normal; }

/* timeline: the "now" marker above the track, dated ticks below it on one or two rows */
.timeline { position: relative; padding: 40px 0 70px; }
.timeline.has-low { padding-bottom: 104px; }
.timeline__track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.timeline__seg {
  position: absolute;
  top: -1px;
  bottom: -1px;
  border-radius: 999px;
}
.timeline__seg--silence { background: rgba(var(--mint-rgb), .18); }
.timeline__seg--grace { background: rgba(var(--mint-rgb), .55); }
.timeline__seg--window { border-left: 1px solid var(--mint); border-radius: 0; background: rgba(var(--mint-rgb), .07); }
.timeline__tick {
  position: absolute;
  top: 70px;
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-dim);
  white-space: nowrap;
  text-align: center;
}
.timeline__tick::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -14px;
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}
.timeline__tick--start { transform: none; text-align: left; }
.timeline__tick--start::before { left: 0; }
.timeline__tick--end { transform: translateX(-100%); text-align: right; }
.timeline__tick--end::before { left: auto; right: 0; }
.timeline__tick--low { top: 104px; }
.timeline__tick--low::before { top: -48px; height: 44px; }
.timeline__now {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 12px;
  line-height: 1;
  color: var(--mint);
  white-space: nowrap;
  pointer-events: none;
  transition: left .5s var(--ease);
}
.timeline__now::after {
  content: '';
  width: 14px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
}
.timeline__now::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 50%;
  width: 1px;
  height: 30px;
  background: var(--mint);
}
.timeline__now--start { transform: translateX(-7px); justify-items: start; }
.timeline__now--start::before { left: 7px; }
.timeline__now--end { transform: translateX(calc(-100% + 7px)); justify-items: end; }
.timeline__now--end::before { left: auto; right: 7px; }
.timeline__empty { color: var(--text-dim); font-size: 15px; padding: 8px 0; margin: 0; }

.time-now {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.time-now strong { font-weight: 400; font-family: var(--mono); font-size: 14px; }

/* status */
.status {
  margin: 0;
  display: grid;
  gap: 0;
}
.status > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.status > div:last-child { border-bottom: 0; }
.status dt { color: var(--text-dim); flex: none; }
.status dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.status dd ol { margin: 0; padding: 0; list-style: none; }
.status .mono { font-family: var(--mono); font-size: 13px; }
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
}
.state-pill::before {
  content: '';
  width: 10px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  transform: rotate(-32deg);
}
.state-pill[data-state='ACTIVE']::before,
.state-pill[data-state='PASSED']::before { background: var(--mint); }

.balance-input {
  width: 110px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(var(--deep-rgb), .4);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

/* compact status strip, mobile only: sticks under the header so the state is always in view.
   Its space is always reserved, so showing it never shifts the layout. */
.status-strip {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px 14px;
  min-height: 41px;
  margin-top: 16px;
  padding: 10px var(--gutter);
  background: rgba(var(--deep-rgb), .9);
  border-block: 1px solid var(--line);
  font-size: 13px;
  visibility: hidden;
}
.status-strip.is-shown { visibility: visible; }
.status-strip .dim { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@media (min-width: 1024px) {
  .status-strip { display: none; }
}

/* log */
.log {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
  font-size: 14px;
}
.log li {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.log li:last-child { border-bottom: 0; }
.log__meta { color: var(--text-dim); font-family: var(--mono); font-size: 12px; }
.log__call { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.log__ok { color: var(--mint); }
.log__revert { color: var(--peach); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.log__note { color: var(--text-dim); }
.log__empty { color: var(--text-dim); padding: 4px 0; }

.sandbox-foot {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 48px auto 0;
  padding-inline: var(--gutter);
  font-size: 15px;
}

/* ======================================================= CONTRACTS */

.source { margin-top: 24px; }
.source .code { max-height: none; }
