/* One conversation and its field note, bound by the same thread. */
.mending {
  --inset: clamp(24px, 3.3vw, 52px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--paper);
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 16px 16px 16px 0;
}
.m-top, .m-bottom, .m-speaker, .m-paperhead, .m-paperfoot, .m-project {
  display: flex;
  align-items: center;
}
.m-top, .m-bottom {justify-content: space-between; gap: 12px; padding-inline: var(--inset)}
.m-top {min-height: 57px; border-bottom: 1px solid var(--arch)}
.m-project {gap: 11px; font-size: .96rem; font-weight: 700}
.m-project svg {width: 23px; fill: none; stroke: var(--lime); stroke-width: 1.5; stroke-linejoin: round}
.m-status {display: inline-flex; align-items: center; gap: 7px; color: var(--lime); font-size: .78rem}
.m-status::before {content: ""; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%}
.m-spread {display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr)}
.m-conversation {min-width: 0; align-self: start; padding: 27px var(--inset) 28px}
.m-kicker, .m-fields h4, .m-next h4 {
  font: 700 .66rem/1.45 "DM Sans", sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.m-source, .m-founder-reply {padding: 0 0 15px 15px; border-left: 1px solid var(--arch)}
.m-source .m-kicker, .m-founder-reply .m-kicker, .m-answers>.m-kicker {color: var(--wash)}
.m-source p, .m-founder-reply p {font-size: .96rem; line-height: 1.5; max-width: 47ch; margin-top: 4px}
.m-founder-reply p {width: fit-content}
.m-source em {color: var(--lime); border-bottom: 1px dashed var(--lime)}
.m-turn {margin: 20px 0 18px}
.m-speaker {gap: 9px; margin-bottom: 8px}
.m-actor {width: 61px; flex: none; margin-left: -6px}
.m-speaker strong, .m-speaker small {display: block}
.m-speaker strong {font: 600 1.25rem/1.1 var(--display); letter-spacing: -.045em}
.m-speaker small {color: var(--wash); font-size: .72rem; margin-top: 2px}
.m-voice:focus {outline: none}
.m-voice:focus-visible {outline: 1px dashed var(--lime); outline-offset: 5px}
.m-voice h3 {max-width: 23ch; color: var(--paper); font-size: clamp(1.55rem,2.2vw,2.16rem); line-height: 1.04; letter-spacing: -.045em; text-wrap: pretty}
.m-voice p {margin-top: 9px; max-width: 50ch; font-size: .97rem; line-height: 1.5; color: var(--fog)}
.m-proposal {margin: 16px 0; border-left: 2px solid var(--lime); padding-left: 14px}
.m-proposal .m-kicker {color: var(--lime)}
.m-proposal p {font-size: 1rem; line-height: 1.45; margin-top: 4px; max-width: 49ch}
.m-answers>.m-kicker {display: block; margin: 0 0 7px}
#m-controls {display: flex; gap: 6px; flex-wrap: wrap}
#m-controls button, .m-reset {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--arch);
  min-height: 44px;
  font: 700 .82rem/1.35 "DM Sans",sans-serif;
  cursor: pointer;
}
#m-controls button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 13px; border-radius: 7px 7px 7px 0; text-align: left;
}
#m-controls button>span:last-child {color: var(--lime); font-size: 1rem}
#m-controls button:hover, #m-controls button:focus-visible {background: var(--lime); color: var(--navy); border-color: var(--lime)}
#m-controls button:is(:hover,:focus-visible)>span:last-child {color: var(--navy); transform: translate(1px,-1px)}
.mending :is(button,summary):focus-visible {outline: 2px solid var(--lime); outline-offset: 3px}
.m-history {margin-top: 8px; color: var(--fog); font-size: .8rem}
.m-history summary {width: fit-content; padding-block: 10px; min-height: 44px; cursor: pointer; display: list-item}
.m-history ol {list-style: none; padding: 0; margin: 4px 0 0; border-left: 1px solid var(--arch)}
.m-history li {padding: 4px 12px; line-height: 1.5}
.m-history li strong {display: block; color: var(--lime)}
.m-desk {
  display: grid; align-content: center;
  padding: 29px var(--inset) 29px 20px;
}
.m-note {
  position: relative; color: var(--ink); background: var(--paper); border-radius: 2px 11px 11px 2px;
  box-shadow: 4px 4px 0 var(--wash);
  padding: 16px clamp(23px,2.8vw,42px) 15px;
}
.m-note::before {
  content: ""; position: absolute; inset: 0 auto 0 11px;
  border-left: 1px dashed var(--line); pointer-events: none;
}
.m-paperhead {justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 7px; color: var(--muted)}
.m-titlegroup {display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 11px 0}
.m-titlegroup h3 {font-size: clamp(1.95rem,2.8vw,2.8rem); line-height: .96; letter-spacing: -.059em}
.m-pocket {width: clamp(62px,7vw,107px); height: auto; flex: none; color: var(--navy)}
.m-fields {margin: 4px 0 14px}
.m-fields>div {display: grid; grid-template-columns: minmax(86px,.76fr) minmax(0,1.24fr); align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line)}
.m-fields h4, .m-next h4 {color: var(--muted); font-size: .64rem; letter-spacing: .075em; text-wrap: initial}
.m-fields p {font-size: .9rem; line-height: 1.4}
.m-open {color: var(--muted)}
.m-next {padding: 12px 14px; background: var(--fog); border-left: 2px solid var(--strong)}
.m-next p {margin-top: 4px; font-size: .93rem; line-height: 1.45}
.m-next.m-chosen {background: var(--lime); border-color: var(--navy)}
.m-next.m-chosen p {font: 600 1.1rem/1.35 var(--display); letter-spacing: -.025em}
.mending[data-stage="proposal"] #m-assumption-row p {border-left: 2px solid var(--arch); padding-left: 8px}
.m-paperfoot {gap: 7px; margin-top: 15px; color: var(--muted); font-size: .72rem}
.m-dot {width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%}
.m-bottom {border-top: 1px solid var(--arch); min-height: 47px; font-size: .76rem; color: var(--wash)}
.m-reset {border: none; display: flex; align-items: center; gap: 6px; padding: 0 4px}
.m-reset span {font-size: 1.15rem; color: var(--lime)}
.m-reset:hover, .m-history summary:hover {color: var(--lime)}
.m-thread {position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; visibility: hidden; overflow: visible}
.m-thread path {stroke: var(--lime); stroke-width: 2; filter: drop-shadow(0 1px 0 var(--navy))}
.m-thread circle {fill: var(--navy); stroke: var(--lime); stroke-width: 1.5}
.m-word-slip {
  position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; opacity: 0;
  padding: 3px 8px; border-bottom: 1px solid var(--navy); border-radius: 2px;
  color: var(--navy); background: var(--lime); font-size: .79rem; font-weight: 700;
}
.m-to-note, .m-to-turn {display: none}
.m-note:focus-visible {outline: 2px dashed var(--lime); outline-offset: 6px}
@media (max-width: 1000px) {
  .mending {--inset: 23px}
  .m-spread {grid-template-columns: minmax(0,1fr) minmax(0,.94fr)}
  .m-desk {padding-left: 4px}
}
@media (max-width: 740px) {
  .mending {--inset: 19px}
  .m-top {align-items: flex-start; justify-content: center; flex-direction: column; gap: 2px; padding-block: 11px}
  .m-status {margin-left: 34px}
  .m-spread {display: block}
  .m-conversation {padding: 20px var(--inset) 10px}
  .m-source, .m-founder-reply {padding-bottom: 0}
  .m-turn {margin: 16px 0}
  .m-voice h3 {max-width: 24ch}
  .m-desk {padding: 16px var(--inset) 21px}
  .m-note {padding: 12px 20px 13px 25px}
  .m-titlegroup {margin: 7px 0}
  .m-titlegroup h3 {font-size: 1.65rem}
  .m-titlegroup h3 br {display: none}
  .m-titlegroup h3 br::after {content: " "}
  .m-pocket {width: 56px}
  .m-fields>div {padding: 6px 0; gap: 9px}
  .m-fields {margin-bottom: 8px}
  .m-paperfoot {margin-top: 9px}
  .m-to-note, .m-to-turn {display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: .8rem; font-weight: 700}
  .m-to-note {color: var(--lime)}
  .m-to-turn {margin-left: auto; color: var(--navy); text-decoration: underline; text-underline-offset: 3px}
  .m-tools {display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px}
  .m-tools .m-history {margin-top: 0}
  .m-tools .m-history[open] {width: 100%}
  .m-paperfoot {flex-wrap: wrap; column-gap: 6px}
  .m-paperfoot button:focus-visible {outline-color: var(--navy)}
  #m-controls {display: grid; grid-template-columns: repeat(2,minmax(0,1fr))}
  #m-controls button {gap: 5px}
  .mending[data-stage="closed"] #m-controls {display: flex}
}
@media (hover: none) {
  #m-controls button:hover:not(:focus-visible) {background: transparent; color: var(--paper); border-color: var(--arch)}
  #m-controls button:hover:not(:focus-visible)>span:last-child {color: var(--lime)}
}

/* Shallow paper enclosures share the field note’s stitched binding. */
.m-enclosures {
  margin: 5px 5px 0 9px;
  background: var(--fog);
  color: var(--ink);
  border-radius: 0 0 7px 0;
}
.m-enclosure {margin-left: 9px; border-left: 1px dashed var(--line)}
.m-enclosure + .m-enclosure {border-top: 1px solid var(--line)}
.m-enclosure summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 8px 16px; cursor: pointer; list-style: none;
}
.m-enclosure summary::-webkit-details-marker {display: none}
.m-enclosure summary strong {display: block; font: 600 1.12rem/1.2 var(--display); letter-spacing: -.035em}
.m-enclosure summary small {display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.3}
.m-enclosure summary::after {content: "+"; color: var(--navy); font-size: 1.25rem; line-height: 1}
.m-enclosure[open] summary::after {content: "−"}
.m-enclosure summary:focus-visible, #m-action:focus-visible {outline: 2px solid var(--navy); outline-offset: -2px}
.m-enclosure dl {margin: 0 16px; padding: 10px 0 14px; border-top: 1px solid var(--line)}
.m-enclosure dt {font-size: .7rem; font-weight: 700; color: var(--muted)}
.m-enclosure dd {font-size: .9rem; line-height: 1.45; margin: 2px 0 10px; max-width: 46ch}
.m-enclosure dd:last-child {margin-bottom: 0}
.m-plan-source {margin: -5px 16px 0; padding-bottom: 10px; color: var(--muted); font-size: .76rem}
.m-plan-source a {color: var(--navy); display: inline-flex; align-items: center; min-height: 44px}
.m-plan-source a:focus-visible {outline-color: var(--navy)}
.mending[data-stage="closed"] #m-prompt {text-transform: none; letter-spacing: 0; color: var(--paper); font-size: 1rem}
#m-controls [data-reply="revisit"] {border-color: transparent; padding-inline: 3px; text-decoration: underline; text-underline-offset: .24em}
#m-controls [data-reply="revisit"]>span:last-child {display: none}
@media (hover:hover) {
  .m-enclosure summary:hover {background: var(--wash)}
}
@media (max-width:740px) {
  .mending[data-stage="trial"] #m-controls {display: flex}
  .m-enclosure summary {padding-inline: 12px}
}
