.tls-sequence {
  container-type: inline-size;
  margin: 0;
  padding: clamp(12px, 2.8%, 22px);
  color: var(--ink);
  background: radial-gradient(circle, #343431 .75px, transparent .9px) 0 0 / 15px 15px, var(--control);
}
.tls-sequence__list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tls-op {
  position: relative;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}
.tls-op:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -16px;
  inset-inline-start: 11px;
  border-inline-start: 1.5px dashed #72726d;
}
.tls-op__number {
  z-index: 1;
  display: grid;
  place-items: center;
  inline-size: 23px;
  block-size: 23px;
  margin-top: 6px;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  background: var(--yellow); color: var(--on-accent);
  font: 650 .77rem/1 var(--mono, ui-monospace, monospace);
}
.tls-op__card {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface-raised);
}
.tls-op__actors { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tls-op__actors--local { flex-wrap: wrap; }
.tls-op__actor {
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font: 650 .79rem/1.2 Inter, Arial, sans-serif;
}
.tls-op__actor svg {
  display: block; flex: none; width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tls-op__actor--ca { background: #282418; color: var(--yellow); }
.tls-op__actor--browser { background: #27212e; color: var(--violet); }
.tls-op__actor--server { background: #192720; color: var(--mint); }
.tls-op__actor-name { min-width: 0; overflow-wrap: anywhere; }
.tls-op__wire {
  position: relative;
  flex: 1;
  min-width: 12px;
  height: 2px;
  border-block-start: 1.6px solid var(--muted);
}
.tls-op__wire::after {
  content: ""; position: absolute; right: 0; top: -3.2px;
  width: 5px; height: 5px; border: solid var(--muted); border-width: 1.6px 1.6px 0 0;
  transform: rotate(45deg);
}
.tls-op__wire--left::after { left: 0; right: auto; transform: rotate(-135deg); }
.tls-op__packet { display: none; }
.tls-op__copy { min-width: 0; overflow-wrap: anywhere; }
.tls-op__title { margin: 0; font: 700 .96rem/1.32 Inter, Arial, sans-serif; }
.tls-op__context { margin: 6px 0 0; font: 600 .78rem/1.45 var(--mono); color: var(--muted); }
.tls-op__fields { margin: 6px 0 0; padding: 0; }
.tls-op__field-row { border-top: 1px solid var(--rule); padding: 4px 0; }
.tls-op__fields dt, .tls-op__fields dd { margin: 0; }
.tls-op__field { font: 650 .84rem/1.4 var(--mono); color: #ff9292; overflow-wrap: anywhere; }
.tls-op__value { font: 480 .87rem/1.45 Inter, Arial, sans-serif; }
.tls-op__detail { margin: 5px 0 0; font: 500 .85rem/1.45 Inter, Arial, sans-serif; color: var(--muted); }
.tls-sequence__caption { margin-top: 14px; font-size: .79rem; line-height: 1.5; color: var(--muted); }
@container (min-width: 620px) and (max-width: 749px) {
  .tls-op__card { grid-template-columns: minmax(195px,.9fr) minmax(0,1.25fr); gap: 18px; padding-block: 12px; }
}
@container (min-width: 750px) {
  .tls-sequence__list { grid-template-columns: repeat(var(--op-count), minmax(0,1fr)); gap: 15px; }
  .tls-op { grid-template-columns: minmax(0,1fr); grid-template-rows: 23px 1fr; gap: 7px; }
  .tls-op__number { margin: 0; }
  .tls-op__card { height: 100%; align-content: start; }
  .tls-op:not(:last-child)::before {
    top: 11px; inset-inline-start: 19px; inset-inline-end: -15px; bottom: auto;
    border-inline-start: 0; border-top: 1.5px dashed #72726d;
  }
}
@container (max-width: 270px) {
  .tls-op { grid-template-columns: 19px minmax(0,1fr); gap: 6px; }
  .tls-op__number { inline-size: 19px; block-size: 19px; }
  .tls-op:not(:last-child)::before { inset-inline-start: 9px; }
  .tls-op__card { padding-inline: 8px; }
  .tls-op__actors { gap: 5px; }
  .tls-op__actor { padding-inline: 4px; }
}
@container (max-width: 235px) {
  .tls-op__actor { gap: 2px; padding-inline: 3px; font-size: .76rem; }
  .tls-op__actors:not(.tls-op__actors--local) svg { width: 13px; height: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tls-op__packet {
    display: block; position: absolute; left: 0; top: -4px; width: 8px; height: 6px;
    background: var(--yellow); border: 1px solid var(--on-accent); border-radius: 1px;
    animation: tls-op-send .72s cubic-bezier(.36,.03,.38,1) var(--op-delay) both;
  }
  .tls-op__wire--left .tls-op__packet { animation-name: tls-op-return; }
  .tls-op__actors--local .tls-op__actor { animation: tls-op-compute .62s ease-out var(--op-delay) both; }
}
@keyframes tls-op-send { 0% { opacity: 0; left: 0; } 12%,85% { opacity: 1; } 100% { opacity: 0; left: calc(100% - 8px); } }
@keyframes tls-op-return { 0% { opacity: 0; left: calc(100% - 8px); } 12%,85% { opacity: 1; } 100% { opacity: 0; left: 0; } }
@keyframes tls-op-compute { 40% { box-shadow: 0 0 0 3px var(--yellow); transform: translateY(-1px); } }
