/* Validated.Directory 2.0.0 · Why did AI mix me up with someone else? (DIR 2.0.0 part D, BEA-432). Loads after
   /learn/_guide/guide.css. The main act: two made-up businesses with close names; the AI's reading runs to both as two
   threads that twist together, and its answer blends them; the owner's site states its town, state and phone and links
   its own pages; the threads come apart and the answer comes back whole. Steps follow the scroll and reverse; only
   opacity and transform move. Motion only under html.m. Reduced motion and scripts off: the five steps as a list and
   the map at its end, the old words struck beside the new. */

.pk { position: relative; z-index: 1; padding-top: 28px; }
.pk-head .pk-sample { margin-top: 16px; }
.pk-head h2 { margin-top: 12px; max-width: 18ch; font-size: clamp(30px, 7.6vw, 46px); line-height: 1.08; color: var(--ink); }
.pk-stage { position: relative; overflow: hidden; }
.pk-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pk-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 26px; padding-bottom: 40px; }

/* The words: the sample line, the five steps, their ticks. */
.pk-sample { justify-self: start; padding: 6px 9px 7px; background: var(--paper-hi); border: 1px solid var(--ink); font: 500 12px/1.45 var(--mono); color: var(--ink); }
.pk-steps { display: grid; gap: 16px; margin-top: 16px; }
.pk-steps li { display: grid; gap: 4px; }
.pk-n { font: 500 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.pk-k { font: 400 clamp(24px, 6.4vw, 30px)/1.12 var(--display); color: var(--ink); }
.pk-t { max-width: 34ch; font: 400 16px/1.48 var(--sans); color: var(--ink); }
.pk-tk { display: none; }

/* Two words in one place: the wrong one and the right one. Still, the wrong one is struck and the right one follows. */
.pk-sw { display: grid; }
.pk-sw > span { display: block; }
.pk-sw .wr { text-decoration: line-through; text-decoration-color: var(--barn); text-decoration-thickness: 1.5px; }

/* The answer: night, because AI lives at night. */
.pk-map { position: relative; }
.pk-q { position: relative; display: grid; gap: 6px; padding: 12px 14px 13px; background: var(--night); color: var(--cream); border: 1px solid var(--night); box-shadow: 0 24px 40px -30px rgba(35, 31, 26, 0.75); --cm: rgba(35, 31, 26, 0.7); }
.pk-qk { font: 500 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-2); }
.pk-qa { font: 400 clamp(19px, 5.2vw, 23px)/1.22 var(--display); }
.pk-q > div { display: grid; gap: 5px; align-content: start; }
.pk-q > div + div { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
.pk-qa b { font: 500 0.82em/1 var(--mono); color: var(--gold-bright); white-space: nowrap; }
.pk-qa b.no { color: #f0a493; }
.pk-tag { padding: 2px 6px 3px; border: 1px solid currentColor; font: 500 12px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.pk-tag.no { color: #f0a493; }
.pk-tag.win { color: var(--ink); background: var(--gold-bright); border-color: var(--gold-ink); }

/* The places it read. */
.pk-cards { display: grid; gap: 12px; margin: 22px 0 0 42px; }
.pk-c { padding: 9px 11px 11px; background: var(--paper-hi); border: 1px solid var(--ink-2); box-shadow: 0 20px 34px -30px rgba(35, 31, 26, 0.8); --cm: rgba(35, 31, 26, 0.55); }
.pk-ck { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 8px; }
.pk-name { flex: 1 1 9rem; min-width: min(100%, 9rem); max-width: 100%; font: 400 19px/1.1 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.pk-st { display: grid; justify-items: end; max-width: 100%; }
.pk-st span { grid-area: 1 / 1; max-width: 100%; padding: 2px 6px 3px; border: 1px solid currentColor; color: var(--ink-2); font: 500 12px/1.3 var(--mono); letter-spacing: 0.02em; text-transform: uppercase; white-space: normal; }
.pk-st .ok { color: var(--gold-ink); }
.pk-st .no { color: var(--barn); }
.pk-st .win { color: var(--ink); background: var(--gold-bright); border-color: var(--gold-ink); }
.pk-st span:not(:last-child) { visibility: hidden; }
.pk-cells { display: grid; gap: 5px; margin-top: 9px; }
.pk-cells > div { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 8px 5px; border: 1px solid rgba(35, 31, 26, 0.22); }
.pk-cells > div::before, .pk-cells > div::after { content: ""; position: absolute; inset: -1px; pointer-events: none; }
.pk-cells .fix::before { border: 1px solid var(--gold-ink); background: rgba(244, 196, 90, 0.34); }
.pk-cells .bad::after { border: 1px solid var(--barn); background: repeating-linear-gradient(135deg, rgba(166, 75, 59, 0.2) 0 3px, transparent 3px 7px); opacity: 0; }
.pk-cells .pk-sw { justify-items: end; }
.pk-cells dt { position: relative; z-index: 1; font: 400 12.5px/1.3 var(--mono); color: var(--ink-2); }
.pk-cells dd { position: relative; z-index: 1; margin: 0; font: 500 13.5px/1.3 var(--mono); color: var(--ink); text-align: right; }
.pk-cells .wr { color: var(--ink-2); }

/* With motion: the stage pins and the steps take turns. JS sets s1 to s5 on the stage (s3 means step 3 or later),
   .read on a place once the light reaches it, and .done once the answer is reported. */
.m .pk-track { height: calc(100svh * 4.8); }
.m .pk-stage { position: sticky; top: 0; height: 100svh; }
.m .pk-in { height: 100%; align-content: center; padding-top: 70px; padding-bottom: 22px; gap: 18px; }
.m .pk-steps { margin-top: 12px; }
.m .pk-steps li { grid-area: 1 / 1; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
.m .pk-steps li.on { opacity: 1; transform: none; }
.m .pk-tk { display: flex; gap: 6px; margin-top: 12px; }
.pk-tk i { width: 22px; height: 3px; background: rgba(35, 31, 26, 0.2); }
.pk-tk i.on { background: var(--gold-ink); }

.m .pk-q > div { grid-area: 1 / 1; margin: 0; padding: 0; border: 0; opacity: 0; transition: opacity 0.4s; }
.m .pk-stage[data-a="0"] .b0, .m .pk-stage[data-a="1"] .b1, .m .pk-stage[data-a="2"] .b2 { opacity: 1; }
.m .pk-sw > span { grid-area: 1 / 1; text-decoration: none; transition: opacity 0.4s; }
.m .pk-sw .rt { opacity: 0; }
.m .s3 .fix[data-at="3"] .wr, .m .s4 .fix[data-at="4"] .wr { opacity: 0; }
.m .s3 .fix[data-at="3"] .rt, .m .s4 .fix[data-at="4"] .rt { opacity: 1; }
.m .pk-st span { visibility: visible; opacity: 0; transition: opacity 0.3s; }
.m .pk-st span.on { opacity: 1; }

.m .pk-c :is(.pk-name, .pk-cells) { opacity: 0.78; transition: opacity 0.4s; }
.m .pk-c.read :is(.pk-name, .pk-cells) { opacity: 1; }
.m .pk-cells dd { opacity: 0; transform: translateY(3px); transition: opacity 0.3s, transform 0.3s; }
.m .pk-c.read .pk-cells dd { opacity: 1; transform: none; }
.m .pk-c.read .pk-cells > div:nth-child(2) dd { transition-delay: 0.08s; }
.m .pk-c.read .pk-cells > div:nth-child(3) dd { transition-delay: 0.16s; }
.m .pk-cells > div::before, .m .pk-cells > div::after { opacity: 0; transition: opacity 0.4s; }
.m .s3 .fix[data-at="3"]::before, .m .s4 .fix[data-at="4"]::before { opacity: 1; }
.m .s2:not(.s5) .pk-cells .bad::after { opacity: 1; }
.m .s5 .pk-c[data-who="1"] :is(.pk-name, .pk-cells) { opacity: 0.78; }

@media (max-width: 360px) {
  .pk-cards { margin-left: 36px; gap: 10px; }
  .pk-c { padding: 8px 9px 9px; }
  .pk-name { font-size: 16.5px; }
  .pk-t { font-size: 15.5px; }
}
@media (max-height: 700px) and (max-width: 899px) {
  .m .pk-in { padding-top: 62px; gap: 12px; }
  .m .pk-steps { margin-top: 8px; }
  .pk-k { font-size: 23px; }
  .pk-cards { margin-top: 16px; gap: 9px; }
  .pk-q { padding: 9px 12px 11px; }
  .pk-qa { font-size: 19px; }
}

/* Laptops: the words on the left; the answer above, the two businesses below, spread across the land. */
@media (min-width: 900px) {
  .pk { padding-top: 56px; }
  .pk-in { grid-template-columns: minmax(300px, 380px) minmax(0, 760px); column-gap: clamp(40px, 6vw, 96px); align-items: center; justify-content: space-between; }
  .pk-k { font-size: clamp(32px, 3vw, 40px); }
  .pk-t { font-size: 19px; }
  .pk-sample { font-size: 12.5px; }
  .pk-q { width: min(560px, 100%); margin-inline: auto; padding: 16px 20px 18px; }
  .pk-qa { font-size: 27px; }
  .pk-cards { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: space-around; align-items: start; gap: 40px; margin: 150px 0 0; }
  .pk-c { padding: 12px 14px 14px; }
  .pk-c[data-who="1"] { margin-top: 56px; }
  .pk-name { font-size: 23px; }
  .pk-cells dd { font-size: 14px; }
  .m .pk-in { padding-top: 84px; padding-bottom: 40px; }
}
