.privacy-source {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
}
.privacy-source img { width: clamp(55px, 10vw, 99px); height: auto; }
.privacy-source b { display: block; margin-bottom: 3px; }
.privacy-source dl { display: grid; grid-template-columns: repeat(4, auto); gap: 0 7px; font-size: .875rem; }
.privacy-source dl div { padding-inline: 4px; border-left: 2px solid var(--line); }
.privacy-source dt { color: var(--muted); }
.privacy-source dd { font-weight: 800; }
.privacy-branch {
  width: 1px;
  height: 26px;
  margin: auto;
  position: relative;
  background: var(--teal);
}
.privacy-branch i {
  display: block;
  position: absolute;
  border: 2px solid var(--teal);
  border-bottom: 0;
  width: min(50vw, 550px);
  height: 13px;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
}
.privacy-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.privacy-path {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(5em, 1fr) minmax(4.5em, auto);
  min-width: 0;
  background: var(--white);
  border-top: 3px solid var(--privacy-color);
  text-align: center;
  --privacy-color: var(--wine);
  --privacy-fill: var(--pink);
}
.privacy-anonymous { --privacy-color: var(--teal); --privacy-fill: var(--mint); }
.privacy-path h3 { background: var(--privacy-fill); color: var(--privacy-color); padding: 4px 7px; font-size: clamp(1.05rem, 2.5vw, 1.4rem); }
.privacy-transform { padding: 5px 6px 0; font-size: .875rem; }
.privacy-transform strong { display: block; }
.privacy-down { display: block; position: relative; width: 2px; height: 16px; margin: 3px auto 6px; color: var(--privacy-color); background: currentColor; }
.privacy-down::after { content: ""; position: absolute; bottom: 0; left: -3px; width: 6px; height: 6px; border-style: solid; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.privacy-record {
  background: var(--paper);
  display: grid;
  max-width: 230px;
  border: 1px solid var(--line);
  margin: 0 auto;
  padding: 5px 12px;
  font-size: .875rem;
}
.privacy-record span + span { border-top: 1px dashed var(--line); }
.privacy-property { display: grid; place-content: center; padding: 8px 6px; line-height: 1.35; }
.privacy-key-table { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 5px; padding: 3px 6px; border: 1px dashed var(--wine); }
.privacy-key-table img { width: clamp(28px, 4vw, 48px); height: auto; }
.privacy-property .privacy-key-table span { margin: 0; }
.privacy-rule span, .privacy-property span { display: block; margin-top: 4px; font-size: .875rem; }
.privacy-property .figure-key { display: inline; margin: 0; font: inherit; }
.privacy-rule { padding: 6px; border-top: 1px solid var(--line); color: var(--privacy-color); }

.hash-chart { font-size: .875rem; }
.hash-head, .hash-row {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(69px, .85fr) minmax(104px, 1fr);
  align-items: center;
  gap: 4px;
  text-align: center;
}
.hash-head { padding-bottom: 5px; border-bottom: 2px solid var(--ink); line-height: 1.2; }
.hash-row { padding-block: 6px; border-bottom: 1px solid var(--line); }
.hash-row code { font-family: Consolas, monospace; font-size: clamp(.8rem, 2.2vw, 1.24rem); }
.hash-order { display: flex; align-items: baseline; justify-content: center; gap: 7px; }
.hash-order b { background: var(--white); border-bottom: 1px solid var(--line); }
.hash-order mark { background: var(--pink); color: var(--wine); padding: 0 1px; }
.hash-transform { display: grid; grid-template-columns: minmax(10px, .2fr) minmax(0, 1fr) minmax(10px, .2fr); align-items: center; }
.hash-transform b { background: var(--yellow); padding: 6px 1px; border: 1px solid var(--ink); }
.hash-row .hash-value { justify-self: center; padding: 4px 8px; background: var(--mint); border-bottom: 1px solid var(--teal); white-space: nowrap; }
.hash-altered .hash-value { background: var(--pink); border-color: var(--wine); }
.hash-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.hash-notes div { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 6px; text-align: center; background: var(--white); line-height: 1.3; }
.hash-notes span { font-size: .875rem; }
.hash-trust-input { display: grid; grid-template-columns: 1fr minmax(2rem,.35fr) 1.15fr; align-items: center; gap: 12px; padding: .55rem; border-bottom: 2px solid var(--ink); text-align: center; }
.hash-trust-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .75rem; text-align: center; }
.hash-trust-compare section { padding: .55rem; border-top: 3px solid var(--wine); background: var(--white); }
.hash-trust-compare section + section { border-color: var(--teal); }
.hash-trust-compare p { margin-block: .3rem; font-size: 1.3rem; }
.hash-trust-compare code, .hash-trust-input code { background: var(--yellow); padding-inline: .18rem; }
.hash-return { display: flex; align-items: center; justify-content: center; gap: 5px 9px; flex-wrap: wrap; font-size: .875rem; margin-top: 8px; }
.hash-stop { font-weight: 900; font-size: 1.15rem; color: var(--wine); }
.hash-full { margin-bottom: 0; }
.hash-full dd { margin: 0 0 6px; overflow-wrap: anywhere; }

.sort-demo {
  display: grid;
  gap: 4px;
  border-block: 1px solid var(--line);
  background: var(--white);
  padding: clamp(5px, 2vw, 14px);
}
.sort-operation { text-align: center; }
.sort-operation label { display: inline-flex; align-items: center; gap: 9px; }
.sort-operation select { padding: 4px 10px; color: inherit; font: inherit; background: var(--paper); border: 1px solid var(--ink); }
.sort-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: .875rem;
}
.sort-legend i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border: 1px solid var(--ink); background: var(--mint); }
.sort-legend .sort-legend-start { border: 2px dashed var(--teal); background: var(--stock); }
.sort-legend .sort-legend-min { background: var(--yellow); }
.sort-lane {
  display: grid;
  grid-template-columns: minmax(57px, 1.17fr) repeat(5, minmax(0, 1fr));
  gap: clamp(2px, .6vw, 5px);
  align-items: center;
  width: min(100%, 670px);
  margin: 0 auto;
  text-align: center;
}
.sort-lane b { font-size: .875rem; }
.sort-position span { color: var(--muted); font-size: .875rem; }
.sort-before span, .sort-after span { display: grid; align-content: center; border: 1px solid var(--line); min-height: 34px; }
.sort-before .sort-first { border: 2px dashed var(--teal); }
.sort-lane .sort-fixed, .sort-trace .sort-fixed { background: var(--mint); }
.sort-before .sort-low { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.sort-motion { gap: 0; }
.sort-motion i {
  --slot-inset: 12.5%;
  grid-column: 2 / 6;
  position: relative;
  border-top: 2px solid var(--wine);
  color: var(--wine);
  margin: 4px var(--slot-inset) 0;
}
.sort-motion i::before, .sort-motion i::after { content: ""; position: absolute; top: -4px; width: 5px; height: 5px; border-top: 2px solid; border-right: 2px solid; }
.sort-motion i::before { left: 0; transform: rotate(-135deg); }
.sort-motion i::after { right: 0; transform: rotate(45deg); }
.sort-motion span { grid-column: 2 / -1; font-size: .875rem; color: var(--wine); }
.sort-outcome { text-align: center; font-size: .875rem; color: var(--teal); }
.sort-trace { max-width: 670px; margin: 8px auto; }
.sort-trace table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .875rem; background: var(--white); }
.sort-trace caption { margin-bottom: 4px; text-align: left; }
.sort-trace th, .sort-trace td { padding: 3px 2px; text-align: center; border: 1px solid var(--line); }
.sort-trace th:first-child { width: 4.8em; }
.sort-trace .sort-current th { background: var(--teal); color: white; }

@media (max-width: 530px) {
  .privacy-source dl { grid-template-columns: repeat(2, auto); }
  .privacy-paths { column-gap: 5px; }
  .privacy-branch i { width: calc(50vw - 29px); }
  .privacy-path { grid-template-rows: auto 3.7em auto 4.4em minmax(5em, 1fr) minmax(6.5em, auto); }
  .privacy-path h3 { padding-inline: 2px; }
  .privacy-transform { display: grid; align-content: center; line-height: 1.35; }
  .privacy-record { align-content: center; padding-inline: 3px; }
  .privacy-property, .privacy-rule { padding-inline: 3px; font-size: .875rem; }
  .hash-order { display: grid; gap: 0; justify-items: center; }
  .hash-transform { grid-template-columns: 10px minmax(61px, 1fr) 10px; font-size: .8rem; }
  .hash-row .hash-value { padding-inline: 3px; }
}
@supports (grid-template-rows: subgrid) {
  .privacy-path { grid-row: span 6; grid-template-rows: subgrid; }
}
