/* The guides' layout, Hands-On Lab: each idea is a row with its words on one side and a toy card on the other,
   sides alternating, stacked on phones. A toy's card carries its state as data-* attributes (js/toys/mount.js),
   and these styles draw each state. Loaded after calm.css, by the three guides only. */
:root {
  --warn: #e8926a;
  --sw-off: #4a5368;
  --knob: #ffffff;
  --knob-shadow: rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --warn: #a8502a;
    --sw-off: #b4bcc7;
    --knob: #ffffff;
    --knob-shadow: rgba(20, 30, 50, 0.3);
  }
}
:root[data-theme="light"] {
  --warn: #a8502a;
  --sw-off: #b4bcc7;
  --knob: #ffffff;
  --knob-shadow: rgba(20, 30, 50, 0.3);
}

body {
  overflow-x: clip;
}
/* The line icons, drawn once at the top of the page and reused by name. */
.sprite {
  position: absolute;
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Opening */
.lab {
  padding-block: 48px 88px;
}
.lab-hero {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: start;
  max-width: 46rem;
  padding-bottom: 76px;
}
.lab-hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 20% -18%;
  background: radial-gradient(closest-side, var(--c-glow), transparent);
  filter: blur(44px);
  opacity: 0.6;
  pointer-events: none;
}
.lab-hero > * {
  position: relative;
}
.lab-hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.lab-hero .lede {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 38rem;
}

/* Rows: words beside a toy. */
.lab-rows {
  display: grid;
  gap: 112px;
}
.lab-row {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 56px;
  align-items: center;
  padding-block: 0;
}
.lab-row.flip {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}
.txt {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.lab-row.flip .txt {
  order: 2;
}
.txt h2 {
  font-size: clamp(1.75rem, 3.1vw, 2.4rem);
  line-height: 1.12;
  font-weight: 400;
}
.txt h2:not(:first-child) {
  margin-top: 26px;
}
.txt p {
  font-weight: 300;
  font-size: 1.1rem;
}
.toy-wrap {
  position: relative;
  min-width: 0;
}
.toy-wrap::before {
  content: "";
  position: absolute;
  inset: 6% 4%;
  background: radial-gradient(closest-side, var(--c-glow), transparent);
  filter: blur(34px);
  pointer-events: none;
}
.lab-end {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-weight: 300;
  font-size: 1.1rem;
}
@media (max-width: 860px) {
  .lab-rows {
    gap: 80px;
  }
  .lab-row,
  .lab-row.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .lab-row.flip .txt {
    order: 0;
  }
  .lab-hero {
    padding-bottom: 56px;
  }
}

/* A toy card and the pieces toys share. */
.card {
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}
.toy {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  min-width: 0;
}
.toy button {
  font-family: var(--font);
}
/* A labeled set of buttons: a fieldset whose legend is the label. */
.toy-top {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.toy-cap {
  padding: 0;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
.sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: 500 0.92rem / 1 var(--font);
  cursor: pointer;
}
.site-btn .i {
  width: 15px;
  height: 15px;
  color: var(--c);
}
.site-btn:hover {
  border-color: var(--c);
}
.site-btn:active {
  transform: scale(0.96);
}
.site-btn[aria-pressed="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, var(--panel-2));
}
/* The line under a toy that says what just happened. */
.say {
  min-height: 1.5em;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}
@keyframes appear {
  from {
    opacity: 0;
  }
}

/* The drawn scenes. One unit is one pixel at 380 px wide, and labels are sized to stay readable on phones. */
.scene {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  font-family: var(--font);
}
.scene .node {
  fill: var(--panel-2);
  stroke: var(--line);
  stroke-width: 1.5;
}
.scene .ni {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene .lbl {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.scene .lane {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 1 7;
  stroke-linecap: round;
  opacity: 0.7;
}
.scene .chev {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pkt rect {
  fill: var(--panel);
  stroke: var(--blue);
  stroke-width: 1.5;
}
.pkt text {
  fill: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}
.ans-pkt rect {
  fill: color-mix(in srgb, var(--blue) 20%, var(--panel));
}

@keyframes ask-go {
  from {
    transform: translateX(-94px);
  }
}
@keyframes answer-back {
  0%,
  50% {
    transform: translateX(120px);
    opacity: 0;
  }
  55% {
    transform: translateX(120px);
    opacity: 1;
  }
}
.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel-2);
  border-radius: 14px;
  overflow: hidden;
}
.contacts li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.contacts li:last-child {
  border-bottom: 0;
}
.contacts .i {
  color: var(--muted);
}
.c-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c-num {
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  font-weight: 500;
}
.c-num.blank {
  width: 86px;
  height: 8px;
  border-radius: 4px;
  border: 1px dashed var(--muted);
  opacity: 0.6;
}
@keyframes row-flash {
  from {
    background: color-mix(in srgb, var(--blue) 26%, transparent);
  }
  to {
    background: transparent;
  }
}

/* Rows in the look of the app's Settings, and the switch. A switch is one button holding its name, its state
   word, and the drawn knob. */
.set-rows {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-rows: 1fr;
  background: var(--panel-2);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.set-rows .set-row:last-child {
  border-bottom: 0;
}
.set-row.solo {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.set-txt {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin-right: auto;
}
.set-name {
  font-weight: 500;
  line-height: 1.35;
}
.set-row small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.4;
}
.sw {
  position: relative;
  width: 46px;
  height: 27px;
  flex: none;
  border-radius: 999px;
  background: var(--sw-off);
}
.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 1px 3px var(--knob-shadow);
}
[aria-checked="true"] .sw {
  background: var(--blue);
}
[aria-checked="true"] .sw::after {
  left: 22px;
}
.sw-state {
  flex: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--warn);
}
[aria-checked="true"] .sw-state {
  color: var(--blue);
}

/* The Secure DNS switch: the path. Open, the lookup is a readable name on a thin line. Sealed, it is a lock
   inside a tube. */
.wire-open {
  stroke: var(--warn);
  stroke-width: 1.6;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.tube {
  fill: color-mix(in srgb, var(--blue) 18%, transparent);
  stroke: var(--blue);
  stroke-width: 1.5;
  opacity: 0;
}
[data-secure="on"] .tube {
  opacity: 1;
}
[data-secure="on"] .wire-open {
  opacity: 0;
}
.sight {
  stroke: var(--warn);
  stroke-width: 1.5;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}
[data-secure="on"] .sight {
  stroke: var(--muted);
  opacity: 0.45;
}
.pk-open rect {
  fill: var(--panel);
  stroke: var(--warn);
  stroke-width: 1.5;
}
.pk-open text {
  fill: var(--warn);
  font-size: 12.5px;
  font-weight: 500;
}
.pk-sealed rect {
  fill: var(--panel);
  stroke: var(--blue);
  stroke-width: 1.5;
}
.pk-sealed use {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pk-sealed .bar {
  fill: var(--blue);
  stroke: none;
  opacity: 0.6;
}
[data-secure="on"] .pk-open,
[data-secure="off"] .pk-sealed {
  display: none;
}
@keyframes travel {
  0% {
    transform: translateX(-149px);
  }
  85% {
    transform: translateX(143px);
    opacity: 1;
  }
  86% {
    transform: translateX(143px);
    opacity: 0;
  }
  87% {
    transform: translateX(0);
    opacity: 0;
  }
}
.watcher .badge {
  fill: var(--panel);
  stroke-width: 1.5;
}
.watcher .b-eye,
.watcher .b-lock {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-secure="off"] .watcher .node,
[data-secure="off"] .watcher .badge,
[data-secure="off"] .watcher .b-eye {
  stroke: var(--warn);
}
[data-secure="on"] .watcher .badge,
[data-secure="on"] .watcher .b-lock {
  stroke: var(--blue);
}
[data-secure="off"] .watcher .b-lock,
[data-secure="on"] .watcher .b-eye {
  display: none;
}
.watcher .ring {
  fill: none;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
[data-secure="off"] .watcher .ring {
  stroke: var(--warn);
}
[data-secure="on"] .watcher .ring {
  stroke: var(--blue);
}
@keyframes ring {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.7);
  }
}
.logs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.log {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-2);
}
.log h3 {
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.log ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 80px;
}
.log li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 24px;
  font-size: 0.9rem;
  line-height: 1;
}
.log .i {
  width: 15px;
  height: 15px;
}
.log li.seen {
  color: var(--warn);
}
.log li.sealed {
  color: var(--blue);
}
.log li .n {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log li .bar {
  flex: 0 1 84px;
  height: 7px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.55;
}
@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Who can still see what: three watchers and a chip for each thing they can or can't see. */
.watchers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.watchers li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel-2);
}
.w-ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
}
.w-ic .i {
  width: 21px;
  height: 21px;
}
.w-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.w-name {
  font-weight: 500;
  line-height: 1.3;
}
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.88rem;
  line-height: 1.3;
}
.fact .i {
  width: 15px;
  height: 15px;
}
.fact.sees {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}
.fact.cant {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 45%, transparent);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}
@keyframes fact-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* Bastion's providers. A line runs from Bastion to the provider in use. The three rows are the same height, so
   the lines (drawn for three equal rows) meet each row's middle. */
.prov {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr);
  align-items: stretch;
}
.prov-icon {
  align-self: center;
  width: 44px;
  height: 44px;
}
.route {
  width: 48px;
  height: 100%;
}
.route path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
[data-use="quad9"] .route .to-quad9,
[data-use="cloudflare"] .route .to-cloudflare,
[data-use="network"] .route .to-network {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}
@keyframes flow {
  to {
    stroke-dashoffset: -20;
  }
}
.pill {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.pill.use {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--bg);
}
.pill.down {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
}
.pill.asking {
  color: var(--gold);
  border-color: var(--gold-line);
}
[data-use="quad9"] .set-row.quad9,
[data-use="cloudflare"] .set-row.cloudflare,
[data-use="network"] .set-row.network {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}
[data-quad9="down"] .set-row.quad9 .set-txt,
[data-cloudflare="down"] .set-row.cloudflare .set-txt {
  opacity: 0.55;
}
@keyframes refuse {
  from {
    background: color-mix(in srgb, var(--gold) 40%, transparent);
  }
}
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.act {
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: 500 0.92rem / 1.1 var(--font);
  cursor: pointer;
}
.act:hover {
  border-color: var(--muted);
}
.act:active {
  transform: scale(0.96);
}
.act.gold {
  color: var(--gold);
  border-color: var(--gold-line);
}
.act.gold:hover {
  border-color: var(--gold);
}
.act[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
  transform: none;
  border-color: var(--line);
}
.ask p {
  font-weight: 500;
  line-height: 1.45;
}
/* A status line with a colored dot: blue for news, warn for a fallback, gold for a refusal or a question. */
.say.status {
  min-height: 3.1em;
  font-size: 0.98rem;
  color: var(--text);
}
.say.status p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}
.say.status p::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  transform: translateY(-1px);
}
.say.status p.warn::before {
  background: var(--warn);
}
.say.status p.gold::before {
  background: var(--gold);
}
.ask {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--gold-line);
  background: color-mix(in srgb, var(--gold) 9%, transparent);
}
.ask-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ask .btn.ghost {
  border-color: var(--gold-line);
}
/* Pieces the Browser Fingerprinting guide's toys share: a caption that is a heading, and switches in a column. */
.toy > .toy-cap {
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0;
}
.sw-stack {
  display: grid;
  gap: 8px;
}
.set-row .w-ic {
  flex: none;
}
.pill.seen {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
}

/* Build a Fingerprint: a crowd of computers. A dot is lit while it still shares every detail switched on. Each
   detail more rules out the dots of the next step, s1 to s5. The card's data-count is how many details are on. */
.crowd .dot {
  fill: var(--blue);
}
.crowd .you {
  fill: var(--text);
}
.crowd .you-ring {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
}
.crowd .out,
:is([data-count="1"], [data-count="2"], [data-count="3"], [data-count="4"], [data-count="5"]) .s1,
:is([data-count="2"], [data-count="3"], [data-count="4"], [data-count="5"]) .s2,
:is([data-count="3"], [data-count="4"], [data-count="5"]) .s3,
:is([data-count="4"], [data-count="5"]) .s4,
[data-count="5"] .s5 {
  fill: var(--muted);
  opacity: 0.22;
}

/* The Tracker's Notes: the row a press is about flashes. */
@keyframes warn-flash {
  from {
    background: color-mix(in srgb, var(--warn) 30%, transparent);
  }
}

/* The hidden picture: the same grid of squares on two computers, darkest in the middle. The squares marked df
   come out one shade off on the other computer, and the switch outlines them. A cover over each grid is drawn
   away when the picture is drawn again. */
.pic .px {
  fill: var(--blue);
  stroke: transparent;
  stroke-width: 1.5;
}
.pic .l0 {
  fill-opacity: 0.12;
}
.pic .l1 {
  fill-opacity: 0.38;
}
.pic .l2 {
  fill-opacity: 0.68;
}
[data-diff="on"] .pic .df {
  stroke: var(--warn);
}
.pic .wipe {
  fill: var(--panel-2);
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
}
.pic .code {
  fill: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
@keyframes wipe {
  from {
    transform: scaleY(1);
  }
}

/* Two ways to push back: a table of what three sites measure. A value trackers can match is in the warn color,
   and a protected one is blue. */
.measures {
  border-radius: 14px;
  background: var(--panel-2);
  overflow-x: auto;
}
.measures table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.measures th,
.measures td {
  padding: 10px 14px;
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}
.measures td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.measures thead th {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
}
.measures tbody th {
  font-weight: 500;
}
.measures tbody tr:last-child th,
.measures tbody tr:last-child td {
  border-bottom: 0;
}
.m-open {
  color: var(--warn);
}
.m-safe {
  color: var(--blue);
}

/* Bastion's switches: under them, what a site sees with the switches as they are. */
.site-sees {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel-2);
}
.site-sees h3 {
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.site-sees ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  justify-items: start;
}
.site-sees .fact {
  border-radius: 14px;
}
/* Pieces the Ad and Tracker Blocking guide's toys share: a small story (a caption over its rows and buttons), a
   pill and a chip for something stopped, and names long enough to need wrapping. */
.story {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.story .toy-cap {
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0;
}
.pill.stopped {
  color: var(--gold);
  border-color: var(--gold-line);
}
.fact.stopped {
  color: var(--gold);
  border-color: var(--gold-line);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.fact.plain {
  padding-left: 12px;
}
.set-name.long {
  overflow-wrap: anywhere;
}
.w-name small {
  margin-left: 6px;
  font-size: 0.84rem;
  font-weight: 300;
  color: var(--muted);
}

/* The drawn web page: the article comes from the site you chose, and three pieces (an ad, a visitor counter, a
   share button) come from other companies, each joined to its company by a line. Used by Open a Page and by the
   Blocker switch, where the blocker turned on leaves the three pieces as empty outlines and fades the companies. */
.webpage .addr {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1;
}
.webpage .addr-t {
  fill: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}
.webpage .skel {
  fill: var(--muted);
  opacity: 0.28;
}
.webpage .wire {
  fill: none;
  stroke: var(--warn);
  stroke-width: 1.5;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}
.webpage .piece rect {
  fill: color-mix(in srgb, var(--warn) 12%, var(--panel));
  stroke: var(--warn);
  stroke-width: 1.5;
}
.webpage .co rect {
  fill: var(--panel);
  stroke: var(--warn);
  stroke-width: 1.5;
}
.webpage .piece text {
  fill: var(--warn);
  font-size: 12px;
  font-weight: 500;
}
.webpage .co text {
  fill: var(--text);
  font-size: 12px;
  font-weight: 500;
}

/* Check a Name: the list in the middle, your browser on its left, the site on its right. The row of the name
   being checked lights up. A request that is sent rests at the site, and a stopped one rests at the list's edge. */
.checker .row rect {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1;
}
.checker .row text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.checker .req circle {
  fill: var(--blue);
}
.checker .x {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linecap: round;
}
.checker .row.is-on rect {
  fill: color-mix(in srgb, var(--gold) 16%, var(--panel));
  stroke: var(--gold);
}
.checker .row.is-on text {
  fill: var(--gold);
}
.checker .req.stopped circle {
  fill: var(--gold);
}
[data-listed="yes"] .req.sent,
[data-listed="no"] .req.stopped {
  display: none;
}
@keyframes req-stop {
  from {
    transform: translateX(-16px);
  }
}
@keyframes req-pass {
  0% {
    transform: translateX(-230px);
  }
  30%,
  50% {
    transform: translateX(-216px);
  }
}
@keyframes list-hit {
  from {
    fill: var(--panel);
    stroke: var(--line);
  }
}

/* The Blocker switch: the page drawn above, then a bar for how much has to load, then the bad link's row. */
[data-blocker="on"] .webpage .wire {
  opacity: 0;
}
[data-blocker="on"] .webpage .co {
  opacity: 0.3;
}
[data-blocker="on"] .webpage .piece rect {
  fill: none;
  stroke: var(--gold);
  stroke-dasharray: 3 4;
}
[data-blocker="on"] .webpage .co rect {
  stroke: var(--line);
}
[data-blocker="on"] .webpage .piece text {
  fill: var(--gold);
  opacity: 0.75;
}
.meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--panel-2);
}
.meter-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.meter-track {
  height: 8px;
  border-radius: 4px;
  background: var(--panel);
  overflow: hidden;
}
.meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--warn);
}
[data-blocker="on"] .meter-fill {
  width: 40%;
  background: var(--blue);
}
.meter-say {
  grid-column: 1 / -1;
  font-size: 0.92rem;
}
@keyframes gold-flash {
  from {
    background: color-mix(in srgb, var(--gold) 36%, transparent);
  }
}

/* How Bastion blocks: the list that did the catching is tinted, and a small drawn Bastion window shows the tab:
   its address, its page, and its footer with the count of what was stopped. */
[data-tab="ads"] .oisd-row,
[data-tab="blocked"] .fake-row {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.mini-win {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  overflow: hidden;
}
.mini-bar {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.mini-addr {
  display: block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mini-page {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 176px;
  padding: 16px;
}
.mini-skel {
  height: 7px;
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.25;
}
.mini-skel.w85 {
  width: 85%;
}
.mini-skel.w70 {
  width: 70%;
}
.mini-skel.w60 {
  width: 60%;
}
.mini-stopped {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-blocked h3 {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.mini-blocked .i {
  margin-top: 2px;
  color: var(--gold);
}
.mini-win .mini-blocked p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}
.mini-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
  font-size: 0.88rem;
}
.mini-facts dt {
  color: var(--muted);
}
.mini-facts dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.mini-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mini-foot .i {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
@media (max-width: 520px) {
  .toy {
    padding: 18px;
    gap: 16px;
  }
  .log h3 {
    min-height: 2.6em;
  }
  .scene .lbl {
    font-size: 14.5px;
  }
  .pkt text,
  .pk-open text {
    font-size: 13.5px;
  }
  .prov {
    grid-template-columns: auto 30px minmax(0, 1fr);
  }
  .route {
    width: 30px;
  }
  .prov-icon {
    width: 36px;
    height: 36px;
  }
  .set-row {
    padding: 12px 13px;
  }
  .measures table {
    font-size: 0.86rem;
  }
  .measures th,
  .measures td {
    padding: 9px 8px;
  }
  .webpage .addr-t,
  .webpage .piece text,
  .webpage .co text,
  .checker .row text {
    font-size: 13px;
  }
  .mini-page {
    padding: 14px;
  }
}
/* A hidden piece stays hidden whatever its own display rule says, in HTML and inside drawings. */
.lab .toy [hidden] {
  display: none;
}

/* Motion. Everything above draws each state at rest. These rules add the movement between states, and only for
   visitors who have not asked for less motion: the rest get every change at once. */
@media (prefers-reduced-motion: no-preference) {
  .site-btn {
    transition:
      border-color 0.2s,
      background 0.2s,
      transform 0.15s;
  }
  .act {
    transition:
      border-color 0.2s,
      transform 0.15s,
      opacity 0.2s;
  }
  .set-row,
  .sw {
    transition: background 0.3s;
  }
  .sw::after {
    transition: left 0.3s cubic-bezier(0.3, 0.7, 0.3, 1.2);
  }
  .wire-open,
  .tube {
    transition: opacity 0.4s;
  }
  .sight {
    transition:
      stroke 0.4s,
      opacity 0.4s;
  }
  .watcher .node,
  .watcher .badge {
    transition: stroke 0.4s;
  }
  .route path {
    transition: stroke 0.3s;
  }
  .fact,
  .ask {
    animation: fact-in 0.35s ease-out;
  }
  [data-use="quad9"] .route .to-quad9,
  [data-use="cloudflare"] .route .to-cloudflare,
  [data-use="network"] .route .to-network {
    animation: flow 0.9s linear infinite;
  }
  [data-play="refuse"] .set-row.quad9 {
    animation: refuse 1.2s ease-out;
  }
  /* Look Up a Site: the question travels to DNS, the number travels back, then the contact list fills it in. */
  [data-play="look"] .ask-pkt {
    animation: ask-go 0.8s cubic-bezier(0.3, 0.6, 0.3, 1) both;
  }
  [data-play="look"] .ans-pkt {
    animation: answer-back 1.7s linear both;
  }
  [data-play="look"] .contacts li.is-on {
    animation: row-flash 1.1s 1.7s ease-out;
  }
  [data-play="look"] .contacts li.is-on .c-num,
  [data-toy="lookup"][data-play="look"] .say p {
    animation: appear 0.3s 1.7s backwards;
  }
  /* The Secure DNS switch: the lookup crosses the path, and each watcher's list gets its line as the lookup passes. */
  [data-play="look"] .travel {
    animation: travel 2.1s linear both;
  }
  [data-play="look"] .watcher.wifi .ring {
    animation: ring 0.8s 0.6s ease-out;
  }
  [data-play="look"] .watcher.isp .ring {
    animation: ring 0.8s 1.25s ease-out;
  }
  [data-play="look"] .log.wifi li.is-on {
    animation: drop-in 0.35s 0.6s ease-out backwards;
  }
  [data-play="look"] .log.isp li.is-on {
    animation: drop-in 0.35s 1.25s ease-out backwards;
  }
  [data-toy="seal"][data-play="look"] .say p {
    animation: appear 0.3s 1.8s backwards;
  }
  /* Build a Fingerprint: dots dim as details rule them out. */
  .crowd .dot {
    transition:
      fill 0.5s,
      opacity 0.5s;
  }
  /* The Tracker's Notes: the cookie's row flashes when it is cleared, and the fingerprint's when it matches. */
  [data-play="clear"] .cookie-row {
    animation: warn-flash 1.2s ease-out;
  }
  [data-play="visit"] .print-row {
    animation: row-flash 1.1s ease-out;
  }
  [data-play="visit"] .cookie-row .pill {
    animation: appear 0.4s 0.4s backwards;
  }
  /* The hidden picture: each cover is drawn away from the top, then the result appears. */
  .pic .px {
    transition: stroke 0.3s;
  }
  [data-play="draw"] .wipe {
    animation: wipe 1s ease-out both;
  }
  [data-play="draw"] .wipe.late {
    animation-delay: 0.25s;
  }
  [data-play="draw"] .code {
    animation: appear 0.3s 1.3s backwards;
  }
  /* Open a Page: the article arrives, then each outside piece with its line and its company, one after another,
     then the company's list gets the new site. */
  [data-play="open"] .webpage .article {
    animation: appear 0.4s both;
  }
  [data-play="open"] .webpage :is(.piece, .wire, .co) {
    animation: appear 0.35s 0.5s backwards;
  }
  [data-play="open"] .webpage :is(.p2, .w2, .c2) {
    animation-delay: 0.9s;
  }
  [data-play="open"] .webpage :is(.p3, .w3, .c3) {
    animation-delay: 1.3s;
  }
  [data-play="open"] .watchers .fact.is-on {
    animation: fact-in 0.35s 1.5s ease-out backwards;
  }
  [data-toy="page"][data-play="open"] .say p {
    animation: appear 0.3s 1.6s backwards;
  }
  /* Check a Name: the request reaches the list. A listed name lights its row and stops. Any other name pauses
     for the check and goes on to the site. */
  [data-play="check"] .req.stopped {
    animation: req-stop 0.5s ease-out both;
  }
  [data-play="check"] .req.stopped .x {
    animation: appear 0.25s 0.5s backwards;
  }
  [data-play="check"] .row.is-on rect {
    animation: list-hit 0.6s 0.4s ease-out backwards;
  }
  [data-play="check"] .req.sent {
    animation: req-pass 1.4s ease-in-out both;
  }
  [data-toy="list"][data-play="check"] .say p {
    animation: appear 0.3s 0.6s backwards;
  }
  /* The Blocker switch: the pieces, lines, companies, and load bar change smoothly, and the bad link's row
     flashes when the link is clicked. */
  .webpage .wire,
  .webpage .co {
    transition: opacity 0.4s;
  }
  .meter-fill {
    transition:
      width 0.6s cubic-bezier(0.3, 0.7, 0.3, 1),
      background 0.4s;
  }
  [data-toy="gets"][data-play="link"] .set-row {
    animation: gold-flash 1.1s ease-out;
  }
  /* What blocking can't do: the scam site's row flashes on each visit. */
  [data-play="visit"] .scam-row {
    animation: gold-flash 1.1s ease-out;
  }
  /* How Bastion blocks: the page that opens fades in, and the footer's count appears after it. */
  [data-play="ads"] .mini-page,
  [data-play="scam"] .mini-page {
    animation: appear 0.4s both;
  }
  [data-play="ads"] .mini-foot span,
  [data-play="scam"] .mini-foot span {
    animation: appear 0.3s 0.5s backwards;
  }
}
