.formant-content {
  color: var(--text);
  width: 100%;
  max-width: var(--max-width);
  min-width: 0;
  margin-inline: auto;
  overflow: clip;
}

.formant-content :is(h1, h2, h3, strong) { color: var(--ink); }

.formant-content a:not(.formant-button) { color: var(--link); }

.formant-hero {
  min-height: calc(100svh - var(--header-height));
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.formant-hero > iframe {
  border: 0;
  z-index: 0;
  position: absolute;
  inset: calc(-1 * var(--header-height)) 0 0;
  width: 100%;
  height: calc(100% + var(--header-height));
}

.formant-hero-copy {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  max-width: 42rem;
  min-width: 0;
  padding: 0 var(--margin) var(--margin);
  overflow-wrap: anywhere;
}

.formant-kicker,
.formant-label,
.formant-metric dt,
.formant-step > span,
.formant-status {
  color: var(--link);
  font-variation-settings: var(--semi-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: var(--text-small);
}

.formant-hero h1 {
  max-width: 17ch;
  margin-top: var(--space-2);
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  line-height: .93;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.formant-hero-copy > p:not(.formant-kicker):not(.formant-actions) {
  max-width: 48rem;
  margin-top: var(--space-3);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.4;
  text-wrap: pretty;
}

.formant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.formant-button {
  border: 1px solid var(--control-border);
  border-radius: 999px;
  padding: .65rem 1rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

button.formant-button { font: inherit; }

.formant-icon-button {
  width: 2.75rem;
  padding-inline: .75rem;
  display: inline-grid;
  place-items: center;
}

.formant-icon-button svg { width: 17px; height: 17px; }
.formant-icon-button[aria-disabled="true"] { color: var(--muted-text); }

.formant-button:hover:not(:disabled):not([data-primary]) {
  background: var(--surface-muted);
  border-color: var(--link);
}

.formant-button:active:not(:disabled):not([data-primary]) {
  background: var(--selected);
  border-color: var(--brand-active);
}

.formant-button[data-primary] {
  color: var(--on-brand);
  background: var(--brand);
  border-color: var(--brand);
}

.formant-button[data-primary]:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.formant-button[data-primary]:active:not(:disabled) {
  background: var(--brand-active);
  border-color: var(--brand-active);
}

.formant-ca {
  width: min(100%, 38rem);
  min-height: 48px;
  margin-top: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.formant-ca > span {
  color: var(--link);
  font-size: var(--text-small);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.formant-ca code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  padding: 0;
}

.formant-ca button {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
}

.formant-ca button:disabled { display: none; color: var(--muted-text); cursor: default; text-decoration: none; }
.formant-action-status { min-height: 1.25em; margin-top: 8px !important; color: var(--link); font-size: var(--text-small) !important; }

.formant-ca-compact {
  width: auto;
  min-width: 9rem;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-medium);
  background: var(--surface);
}

.formant-top-button { min-height: 34px; }
.formant-header-ca { justify-self: start; }
header-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
header-bar > [data-logo="word"] { justify-self: center; }
header-actions {
  justify-self: end;
  align-items: center;
  gap: 8px;
}
header-actions .formant-button {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-medium);
  font-variation-settings: var(--semi-mono);
  letter-spacing: .02em;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--control-border);
}
header-actions .formant-icon-button {
  width: 34px;
  padding: 0;
}
header-actions .formant-button:hover,
header-actions .formant-button:focus-visible {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--link);
  background: var(--surface-muted);
}

@media (min-width: 1024px) {
  .formant-ca-compact,
  header-actions .formant-button {
    height: 30px;
    min-height: 30px;
    font-size: 12px;
  }
  header-actions .formant-icon-button { width: 30px; }
}
.formant-hero > .formant-action-status {
  position: absolute;
  top: 70px;
  right: var(--margin);
  z-index: 3;
  margin: 0 !important;
  text-align: right;
}

.formant-wallet-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--control-border);
  color: var(--ink);
  background: var(--surface);
}

.formant-wallet-dialog::backdrop { background: var(--scrim); }
.formant-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}
.formant-wallet-head button {
  border: 0;
  padding: 0;
  color: var(--muted-text);
  background: transparent;
  text-decoration: underline;
}
.formant-wallet-list { display: grid; padding: 10px; gap: 8px; }
.formant-wallet-list button {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--control-border);
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}
.formant-wallet-list button:hover { border-color: var(--link); background: var(--surface-muted); }
.formant-wallet-list button span:last-child { color: var(--link); font-size: var(--text-small); }
.formant-wallet-empty { padding: 24px; color: var(--muted-text); line-height: 1.5; }

.formant-index {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px var(--margin);
  background: var(--paper);
  border-block: 1px solid var(--border);
}

.formant-index::-webkit-scrollbar { display: none; }

.formant-index a {
  white-space: nowrap;
  padding: .45rem .75rem;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  text-decoration: none;
}

.formant-index a:hover,
.formant-index a:focus-visible {
  border-color: var(--link);
  color: var(--link);
}

.formant-content [id] { scroll-margin-top: calc(var(--header-height) + 28px); }

.formant-section,
.formant-scene-section {
  padding: clamp(84px, 12vw, 188px) var(--margin) 0;
}

.formant-section-head {
  display: grid;
  gap: var(--space-3);
  margin-bottom: clamp(36px, 7vw, 88px);
}

.formant-section-head h2,
.formant-page-hero h1 {
  max-width: 19ch;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: .95;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.formant-section-head > p:last-child,
.formant-page-hero > h1 + p {
  max-width: 58rem;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

.formant-scene-section {
  position: relative;
}

.formant-scene-frame {
  display: block;
  border: 0;
  background: var(--paper);
  mix-blend-mode: normal;
  aspect-ratio: 1250 / 610;
  width: 100%;
  min-height: 300px;
  margin-top: 42px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, #0003 0, #000 34%, #000 100%);
}

.formant-scene-copy {
  max-width: 34rem;
  position: relative;
  z-index: 2;
}

.formant-scene-copy h2 {
  margin-top: var(--space-2);
  font-size: clamp(1.8rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.formant-scene-copy p:not(.formant-label) {
  margin-top: var(--space-3);
  color: var(--text);
  line-height: 1.5;
}

.formant-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.formant-card {
  grid-column: span 12;
  min-height: 14rem;
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
}

.formant-card h3 {
  max-width: 20ch;
  margin-top: var(--space-2);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.08;
}

.formant-card p:last-child {
  max-width: 38rem;
  color: var(--muted-text);
  line-height: 1.5;
}

.formant-step {
  grid-column: span 12;
  min-height: 12rem;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.formant-step h3 {
  margin-top: 18px;
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
  letter-spacing: -.025em;
}

.formant-step p {
  max-width: 32rem;
  margin-top: 14px;
  color: var(--muted-text);
  line-height: 1.5;
}

.formant-economics {
  background: var(--surface);
  padding-block: clamp(56px, 8vw, 112px);
  margin-top: clamp(84px, 12vw, 188px);
}

.formant-metrics {
  margin-top: 50px;
}

.formant-metric {
  grid-column: span 12;
  padding-block: 24px;
  border-top: 1px solid var(--border);
}

.formant-metric dd {
  margin-top: 10px;
  font-size: clamp(1.4rem, 3vw, 2.7rem);
  letter-spacing: -.035em;
}

.formant-metric p {
  max-width: 30rem;
  margin-top: 12px;
  color: var(--muted-text);
  line-height: 1.45;
}

.formant-cta {
  padding-bottom: clamp(84px, 12vw, 188px);
}

.formant-page-hero {
  padding: clamp(96px, 15vw, 220px) var(--margin) clamp(64px, 10vw, 140px);
  border-bottom: 1px solid var(--border);
}

.formant-page-hero h1 { margin-top: var(--space-2); }
.formant-page-hero > h1 + p { margin-top: 28px; }

.formant-prose {
  max-width: 66rem;
  margin-inline: auto;
}

.formant-prose h2 {
  margin-top: clamp(72px, 10vw, 140px);
  font-size: clamp(1.7rem, 3.5vw, 3.2rem);
  letter-spacing: -.04em;
  line-height: 1;
}

.formant-prose h3 {
  margin-top: 44px;
  font-size: 1.25rem;
}

.formant-prose p,
.formant-prose li {
  color: var(--text);
  font-size: var(--text-prose);
  line-height: 1.65;
}

.formant-prose h2 + p,
.formant-prose h3 + p,
.formant-prose p + p,
.formant-prose p + ul,
.formant-prose pre + p { margin-top: 18px; }

.formant-prose ul { padding-left: 1.25rem; }

.formant-prose ol { padding-left: 1.4rem; }

.formant-numbered-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.formant-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--border);
  border: 1px solid var(--border);
}

.formant-copy-grid section {
  min-height: 12rem;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
}

.formant-copy-grid h3 { margin-top: 0; }
.formant-copy-grid h3 + p { margin-top: 16px; }

.formant-callout {
  margin-top: clamp(44px, 7vw, 80px);
  padding: clamp(22px, 4vw, 40px);
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.formant-callout p:last-child {
  max-width: 46rem;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.4;
}

.formant-prose code {
  color: var(--ink);
}

.formant-prose pre {
  margin-top: 22px;
  padding: clamp(18px, 3vw, 30px);
  overflow-x: auto;
  color: var(--ink);
  background: var(--surface-muted);
  border-left: 2px solid var(--link);
  line-height: 1.55;
}

.formant-manifest {
  display: grid;
  gap: 18px;
  max-width: 56rem;
  margin-top: 36px;
}

.formant-launch-prose {
  max-width: 90rem;
}

.formant-launch-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(19rem, .8fr);
  align-items: start;
  gap: clamp(36px, 6vw, 88px);
}

.formant-launch-main {
  max-width: none;
  margin-top: 0;
  gap: 22px;
}

.formant-form-section {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: clamp(50px, 7vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.formant-form-section:first-child { margin-top: 0; }
.formant-form-section h2 { margin-top: 0; font-size: clamp(1.55rem, 3vw, 2.5rem); }
.formant-form-section h2 + p { margin-top: 10px; }
.formant-section-number { color: var(--link); font-size: var(--text-small); }

.formant-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.formant-field-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.formant-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.formant-field label,
.formant-field legend {
  color: var(--muted-text);
}

.formant-field legend { margin-bottom: 10px; }
.formant-field[role="group"],
fieldset.formant-field { padding: 0; border: 0; }

.formant-field-hint {
  color: var(--muted-text);
  font-size: var(--text-small);
}

.formant-field input,
.formant-field textarea,
.formant-field select {
  width: 100%;
  border: 1px solid var(--control-border);
  border-radius: 0;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--surface);
}

.formant-field input:focus,
.formant-field textarea:focus,
.formant-field select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.formant-field input:user-invalid,
.formant-field textarea:user-invalid,
.formant-field select:user-invalid { border-color: var(--danger); }

.formant-field :is(input, textarea)::placeholder {
  color: var(--muted-text);
  opacity: 1;
}

.formant-field textarea { min-height: 140px; resize: vertical; }

.formant-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.formant-option {
  position: relative;
  cursor: pointer;
}

.formant-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.formant-option span {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--border);
  color: var(--muted-text);
  background: var(--surface);
}

.formant-option input:checked + span {
  color: var(--link);
  background: var(--selected);
  border-color: var(--link);
}

.formant-option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.formant-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.formant-launch-actions button:disabled { color: var(--muted-text); cursor: not-allowed; }

.formant-form-status {
  min-height: 1.5em;
  color: var(--link);
}

.formant-launch-aside {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  display: grid;
  gap: 26px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--border);
  background: var(--surface);
}

.formant-readiness {
  display: grid;
  gap: 18px;
}

.formant-readiness > div:first-child {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.formant-readiness strong { font-size: 1.55rem; font-weight: 450; }
.formant-readiness-track { height: 3px; background: var(--border); }
.formant-readiness-track span { display: block; width: 0; height: 100%; background: var(--link); transition: width .25s ease; }

.formant-summary-list { display: grid; }
.formant-summary-list div { padding-block: 14px; border-top: 1px solid var(--border); }
.formant-summary-list dt { color: var(--muted-text); font-size: var(--text-small); }
.formant-summary-list dd { margin-top: 7px; overflow-wrap: anywhere; line-height: 1.4; }

.formant-local-note {
  color: var(--muted-text) !important;
  font-size: var(--text-small) !important;
  line-height: 1.5 !important;
}

.formant-manifest-preview { border-top: 1px solid var(--border); padding-top: 16px; }
.formant-manifest-preview summary { cursor: pointer; }
.formant-manifest-preview pre { max-height: 28rem; margin-top: 14px; font-size: .75rem; }

.formant-launch-receipt {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--link);
}

.formant-launch-receipt[hidden] { display: none; }
.formant-launch-receipt dl { display: grid; gap: 14px; }
.formant-launch-receipt dt { color: var(--muted-text); font-size: var(--text-small); }
.formant-launch-receipt dd { margin-top: 5px; overflow-wrap: anywhere; line-height: 1.4; }
.formant-launch-receipt code { font-size: .78rem; }
.formant-launch-receipt .formant-button { width: 100%; justify-content: center; }

footer[data-formant-footer] address {
  max-width: 26rem;
}

footer[data-formant-footer] {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px var(--margin) var(--margin);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px var(--gutter);
}

footer[data-formant-footer] > [data-logo] { align-self: start; }
footer[data-formant-footer] nav p { color: var(--muted-text); }
footer[data-formant-footer] ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}
footer[data-formant-footer] address {
  color: var(--muted-text);
  font-style: normal;
  line-height: 1.5;
}
footer[data-formant-footer] > p { color: var(--muted-text); }

dialog#menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--surface);
}
dialog#menu:not([open]) { display: none; }
dialog#menu::backdrop { background: var(--scrim); }

dialog#menu menu-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--margin);
}

dialog#menu menu-top > [data-logo="word"] { margin-right: auto; }
dialog#menu menu-actions { display: flex; gap: 8px; }
dialog#menu nav[data-grid] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  padding-block: clamp(48px, 10vw, 140px);
}
dialog#menu menu-row,
dialog#menu menu-subnav { display: grid; gap: 14px; }
dialog#menu menu-subnav { margin-top: 24px; color: var(--muted-text); }
dialog#menu a { text-decoration: none; }
dialog#menu a:hover { color: var(--link); }

@media (max-width: 1023px) {
  .formant-launch-shell { grid-template-columns: 1fr; }
  .formant-launch-aside { position: static; }
  .formant-field-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 700px) {
  .formant-card { grid-column: span 6; }
  .formant-step { grid-column: span 6; }
  .formant-metric { grid-column: span 4; }
}

@media (min-width: 1024px) {
  .formant-hero > iframe {
    inset: calc(-1 * var(--header-height)) 0 0;
    width: 100%;
    height: calc(100% + var(--header-height));
  }
  .formant-hero-copy {
    max-width: 43rem;
    padding: 0 var(--margin) 48px;
  }
  .formant-hero h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 5.2vw, 5.2rem);
  }
  .formant-hero-copy > p:not(.formant-kicker):not(.formant-actions) {
    max-width: 38rem;
  }
  .formant-scene-section { min-height: 760px; }
  .formant-scene-section .formant-scene-frame {
    position: absolute;
    inset: 80px var(--margin) auto 30%;
    width: calc(70% - var(--margin));
  }
  .formant-scene-copy { padding-top: 80px; }
  .formant-card { grid-column: span 4; }
  .formant-step { grid-column: span 3; }
  footer[data-formant-footer] { grid-template-columns: 1fr repeat(3, 1fr); }
  footer[data-formant-footer] address { grid-column: 1 / span 2; }
}

@media (max-width: 699px) {
  .formant-content { width: 100vw; max-width: 100vw; }
  .formant-hero { min-height: calc(100svh - var(--header-height)); }
  .formant-hero > iframe { height: calc(100% + var(--header-height)); }
  .formant-hero-copy {
    width: calc(100vw - 2 * var(--margin));
    max-width: none;
    margin-inline: var(--margin);
    padding-inline: 0;
  }
  .formant-hero h1 { max-width: 100%; overflow-wrap: anywhere; }
  .formant-hero-copy > p { max-width: 100%; }
  .formant-hero-copy > p:not(.formant-kicker):not(.formant-actions) {
    font-size: 15.5px;
    line-height: 1.42;
  }
  .formant-copy-grid,
  .formant-field-grid,
  .formant-field-grid-three { grid-template-columns: 1fr; }
  .formant-copy-grid section { min-height: 0; }
  .formant-form-section { grid-template-columns: 2rem minmax(0, 1fr); }
  .formant-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formant-launch-actions { display: grid; grid-template-columns: 1fr; }
  .formant-launch-actions .formant-button { width: 100%; justify-content: center; }
  .formant-launch-aside { padding: 20px; }
  .formant-header-ca {
    min-width: 6.5rem;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .formant-header-ca button { display: none; }
  button.formant-top-button {
    width: 5rem;
    font-size: 0 !important;
  }
  button.formant-top-button::after { content: "Wallet"; font-size: var(--text-small); }
  .formant-hero > .formant-action-status {
    top: 62px;
    left: var(--margin);
    right: var(--margin);
  }
  .formant-index { top: var(--header-height); }
  .formant-scene-frame { mask-image: none; }
  dialog#menu menu-top { gap: 8px; }
  dialog#menu menu-actions { margin-left: auto; }
  dialog#menu nav[data-grid] { grid-template-columns: 1fr; }
  header-actions {
    display: flex !important;
    position: static !important;
    z-index: 8;
  }
  header-actions [data-menu-icon] { display: grid !important; }
  header-actions [data-menu-text],
  header-actions [data-sign-in] { display: none !important; }
  header-bar { width: 100vw !important; max-width: 100vw !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  header-bar > [data-logo="word"]:after { display: none; }
}

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

[data-logo="mark"], [data-logo="word"]::before {
  background-image: var(--brand-logo) !important;
}
[data-logo="word"]::after { content: var(--brand-name) !important; }
header-bar > [data-logo="word"] { grid-column: 2; }
header-actions { grid-column: 3; grid-row: 1; white-space: nowrap; }
header-bar > .formant-header-ca { grid-column: 1; grid-row: 1; }
.formant-content { max-width: min(100%, var(--max-width)); }
.formant-button { display: inline-flex; align-items: center; justify-content: center; }
.formant-button:focus-visible, [data-button]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.formant-button:active:not(:disabled) { transform: translateY(1px); }
.formant-button:disabled {
  color: var(--muted-text);
  background: var(--surface-muted);
  border-color: var(--border);
  cursor: not-allowed;
}
.formant-tool-hero { padding-block: clamp(44px, 6vw, 94px) clamp(32px, 4vw, 64px); }
.formant-tool-hero > h1 + p { margin-top: 16px; }
.formant-index a[aria-current="page"] { border-color: var(--link); color: var(--link); background: var(--selected); }
.formant-prose { padding-top: 0; padding-bottom: clamp(80px, 10vw, 140px); }
.formant-hero-copy { pointer-events: none; }
.formant-hero-copy a { pointer-events: auto; }
.formant-hero-copy h1 {
  max-width: 18ch;
  font-size: clamp(2.2rem, 4.1vw, 4.5rem);
  text-wrap: pretty;
}
.formant-hero-copy > p:not(.formant-kicker) { max-width: 35rem; }
.formant-hero-controls {
  position: absolute;
  right: var(--margin);
  top: 14px;
  display: flex;
  gap: .65rem;
  align-items: center;
  color: var(--muted-text);
  font-size: .78rem;
}
.formant-hero-controls button { font-size: inherit; padding: .45rem .65rem; color: var(--ink); }
.formant-scene-frame { z-index: 1; }
.formant-scene-copy .formant-actions { position: relative; z-index: 3; }
.formant-step .formant-button { margin-top: .65rem; font-size: .88rem; }
.formant-metric a:hover { text-decoration: underline; }

.formant-wallet-dialog {
  max-height: min(780px, calc(100dvh - 24px));
  width: min(520px, calc(100% - 24px));
  max-width: none;
  margin: auto;
  position: fixed;
  inset: 0;
  overflow: auto;
  color: var(--ink);
  overscroll-behavior: contain;
}
.formant-wallet-dialog > .formant-wallet-head {
  display: flex;
  position: sticky;
  inset: auto;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.wallet-modal-title { font-size: clamp(1rem, 3vw, 1.35rem); }
.wallet-modal-body { padding: 16px; overflow-wrap: anywhere; line-height: 1.5; }
.wallet-modal-body .formant-wallet-list { padding: 14px 0 0; }
.wallet-modal-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .65rem; margin-block: 10px 18px; }
.wallet-modal-details dt { color: var(--muted-text); }
.wallet-modal-details dd { margin: 0; overflow-wrap: anywhere; }
.wallet-modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem .4rem; }
.wallet-modal-status:not(:empty) { margin-top: .9rem; color: var(--muted-text); }
.wallet-modal-confirm { display: flex; align-items: start; gap: .5rem; margin-top: 1.1rem; }

@media (max-width: 699px) {
  header-bar {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  header-bar > [data-logo="word"] { grid-column: 1; justify-self: start; }
  header-bar > [data-logo="word"]::after { display: block; }
  header-actions { grid-column: 2; }
  header-actions [data-menu-icon], header-actions .formant-top-button { min-height: 44px; }
  button.formant-top-button {
    width: auto;
    font-size: .75rem !important;
    min-width: 4rem;
    padding-inline: 8px;
  }
  button.formant-top-button::after { content: none; }
  header-bar:has(.formant-header-ca) { grid-template-columns: minmax(0, 1fr) auto; }
  header-bar:has(.formant-header-ca) > [data-logo="word"] { grid-column: 1; grid-row: 1; }
  header-bar > .formant-header-ca { grid-row: 2; grid-column: 1 / -1; }
  dialog#menu menu-top [data-logo="word"]::after { display: none; }
  .formant-hero { min-height: max(660px, calc(100svh - var(--header-height))); }
  .formant-hero-copy h1 { font-size: clamp(2.03rem, 8.5vw, 3rem); }
  .formant-hero-copy > p:not(.formant-kicker):not(.formant-actions) { margin-top: .65rem; }
  .formant-hero-copy .formant-actions { margin-top: 14px; }
  .formant-hero-controls { left: var(--margin); right: var(--margin); justify-content: space-between; }
  .formant-hero-controls button { min-height: 44px; }
  .formant-scene-frame { min-height: 0; }
  .wallet-modal-actions .formant-button { min-height: 44px; text-align: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .formant-entered .formant-section-head, .formant-entered .formant-scene-copy {
    animation: formant-slide-in .36s ease-out both;
  }
  @keyframes formant-slide-in {
    from { opacity: .68; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}

@media (min-width: 700px) {
  header-actions [data-menu-icon] { display: none !important; }
}

[data-logo="word"]:not([data-brand-with-logo])::before { display: none; }
[data-logo="word"]::after { font-weight: 620; letter-spacing: .12em; }
footer[data-formant-footer] > [data-logo="word"] { align-self: start; justify-self: start; }
.tandrivo-social { display: block; width: fit-content; margin-top: .7rem; }
.tandrivo-token {
  margin: 1.2rem var(--margin);
  padding: 1.1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.tandrivo-token code { display: block; margin-top: .5rem; overflow-wrap: anywhere; }
.tandrivo-token [role="status"]:not(:empty) { margin-top: .65rem; }
.tandrivo-workspace-hero { padding-block: clamp(18px, 2.2vw, 34px) clamp(16px, 1.9vw, 26px); }
.tandrivo-workspace-hero h1 { font-size: clamp(2rem, 3.3vw, 3.4rem); margin-top: 0; }
.tandrivo-workspace-hero > h1 + p { margin-top: .55rem; font-size: 1rem; }
.tandrivo-example {
  margin-top: 2rem;
  max-width: 32rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.tandrivo-example h3 { font-size: clamp(1rem, 2.1vw, 1.3rem); line-height: 1.25; margin-top: .45rem; }
.tandrivo-example-roles { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.tandrivo-example-roles > span { color: var(--link); }
.tandrivo-example-role { position: relative; }
.tandrivo-example-role button {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .48rem;
  border: 1px solid var(--control-border);
  font-size: .78rem;
}
.tandrivo-example-role button:hover { border-color: var(--link); background: var(--surface-muted); }
.tandrivo-example-role button[aria-expanded="true"] { border-color: var(--link); color: var(--link); background: var(--selected); }
.tandrivo-example-role > p:not(.formant-label) {
  display: none;
  position: absolute;
  top: calc(100% + .25rem);
  left: 0;
  z-index: 5;
  margin: 0;
  width: min(16rem, 75vw);
  padding: .65rem;
  border: 1px solid var(--link);
  background: var(--surface);
  color: var(--ink);
  font-size: .78rem;
}
.tandrivo-example-role:has(button:is(:hover, :focus-visible, [aria-expanded="true"])) > p { display: block; }
.tandrivo-example-role:last-child > p { left: auto; right: 0; }
.tandrivo-example p.tandrivo-example-outputs { margin-top: .55rem; font-size: .81rem; }
.tandrivo-example .formant-actions { margin-top: .7rem; }
.tandrivo-example .formant-button { font-size: .8rem; min-height: 44px; }

@media (max-width: 699px) {
  dialog#menu menu-top [data-logo="word"]::after { display: block; font-size: .74rem; }
  dialog#menu menu-actions > a { display: none; }
  .formant-scene-section:has(.tandrivo-example) .formant-scene-frame { margin-top: 22px; }
}

.tandrivo-example-role button { background: transparent; color: var(--ink); }
@media (max-width: 380px) {
  .tandrivo-example-roles { gap: .25rem; }
  .tandrivo-example-role button { padding-inline: .35rem; }
}
