/* Two search terrains under one question (includes/visuals/terrains.php): results page and AI assistant */
.tn { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.tn p { margin: 0; }

/* the shared question and the fork to both screens */
.tn-q { display: flex; align-items: center; gap: 12px; justify-self: center; width: 100%; max-width: 640px; padding: 12px 20px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 8px 24px -16px rgba(12, 43, 21, .35); }
.tn-q-i { position: relative; flex: none; width: 14px; height: 14px; border: 2px solid var(--forest); border-radius: 50%; }
.tn-q-i::after { content: ""; position: absolute; right: -6px; bottom: -4px; width: 7px; height: 2px; background: var(--forest); transform: rotate(45deg); }
.tn-q-t { font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--forest); }
.tn-fork { display: none; position: relative; height: 26px; }
.tn-fork i { position: absolute; display: block; background: var(--forest); }
.tn-fork-c { left: calc(50% - 1px); top: 0; width: 2px; height: 13px; transform-origin: top; }
.tn-fork-h { left: 25%; right: 25%; top: 12px; height: 2px; transform-origin: center; }
.tn-fork-l, .tn-fork-r { top: 12px; width: 2px; height: 14px; transform-origin: top; }
.tn-fork-l { left: calc(25% - 1px); }
.tn-fork-r { left: calc(75% - 1px); }

/* the two screens */
.tn-screens { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.tn-col { min-width: 0; display: grid; gap: 22px; align-content: start; }
.tn-screen { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px -28px rgba(12, 43, 21, .3); overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--ink); }
.tn-sc-h { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--forest); }
.tn-sc-h .tn-lv { margin-left: auto; }
.tn-dots { display: inline-flex; gap: 5px; }
.tn-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cfc9c0; }
.tn-sc-b { padding: 12px; display: grid; gap: 8px; }

/* lever tags and "your page" marks */
.tn-lv { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; line-height: 1.4; flex: none; }
.tn-lv--seo { background: var(--forest); color: var(--green); }
.tn-lv--geo { background: var(--green); color: var(--forest); }
.tn-lv--sea { background: var(--white); color: var(--forest); box-shadow: 0 0 0 1.5px var(--forest) inset; }
.tn-you { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--mint); color: var(--green-text); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }
.tn-hit { position: relative; border-radius: 8px; background: var(--mint); box-shadow: 0 0 0 1.5px var(--green-2); }

/* zones of the results page */
.tn-z { padding: 10px 12px 12px; border-radius: 8px; border: 1px solid var(--line); }
.tn-z-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.tn-res-t { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--forest); }
.tn-res-s { margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.tn-z--ai { background: linear-gradient(180deg, #f6fff2, var(--white)); border-color: var(--sage); }
.tn-ai-t { font-size: 13px; line-height: 1.45; }
.tn-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tn-chip { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); }
.tn-chip--you { border-color: var(--green-2); background: var(--mint); color: var(--green-text); font-weight: 700; }
.tn-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-row { display: grid; gap: 1px; padding: 6px 8px; }
.tn-row-n { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--forest); }
.tn-row--org .tn-row-n { font-size: 13.5px; }
.tn-row-s { font-size: 12px; color: var(--ink-2); }
.tn-map { position: relative; height: 54px; margin-bottom: 8px; border-radius: 6px; overflow: hidden; background: linear-gradient(90deg, transparent 0 22%, #d7e6da 22% 25%, transparent 25% 58%, #d7e6da 58% 61%, transparent 61%), linear-gradient(180deg, transparent 0 45%, #d7e6da 45% 52%, transparent 52%), #edf3ee; }
.tn-pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #a8b5ac; box-shadow: 0 0 0 2px var(--white); }
.tn-pin--you { left: 43%; top: 30%; width: 16px; height: 16px; background: var(--forest); box-shadow: 0 0 0 2.5px var(--green), 0 0 0 4.5px var(--white); }
.tn-pin--2 { left: 16%; top: 55%; }
.tn-pin--3 { left: 72%; top: 20%; }
.tn-paa { list-style: none; margin: 0; padding: 0; display: grid; }
.tn-paa li { position: relative; padding: 7px 24px 7px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.tn-paa li::after { content: ""; position: absolute; right: 6px; top: 10px; width: 7px; height: 7px; border-right: 1.8px solid var(--ink-2); border-bottom: 1.8px solid var(--ink-2); transform: rotate(45deg); }

/* the assistant */
.tn-bub { position: relative; max-width: 100%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.tn-bub--u { justify-self: end; max-width: 88%; background: var(--paper); color: var(--forest); font-weight: 600; border-bottom-right-radius: 4px; }
.tn-bub--a { margin-top: 4px; padding-left: 40px; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.tn-spark { position: absolute; left: 13px; top: 14px; width: 16px; height: 16px; background: var(--forest); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.tn-ans { color: var(--ink); }
.tn-s { display: inline; }
.tn-cite { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 2px; padding: 0 4px; border-radius: 5px; background: var(--paper); color: var(--ink-2); font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.tn-cite--you { background: var(--forest); color: var(--green); }
.tn-cursor { display: inline-block; width: 2px; height: 14px; margin-left: 3px; background: var(--forest); vertical-align: -2px; }
.tn-src-l { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.tn-srcs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tn-src { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; }
.tn-src-n { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--paper); color: var(--ink-2); font-size: 11px; font-weight: 700; }
.tn-src.tn-hit .tn-src-n { background: var(--forest); color: var(--green); }
.tn-src-b { display: grid; gap: 1px; min-width: 0; }

/* under the assistant: the reading keys */
.tn-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 4px 6px 0; }
.tn-f-t { margin: 0 0 4px; }
.tn-ret-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.tn-ret-i { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.tn-ret-n { font-family: var(--font-serif); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--forest); }
.tn-ret-t { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.tn-lev-l { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.tn-lev-l li { display: flex; align-items: center; gap: 8px; }

@media (min-width: 560px) { .tn-ret-i { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; } }
@media (min-width: 860px) {
  .tn-fork { display: block; margin-top: 2px; }
  .tn-screens { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 0; align-items: start; }
}
@media (min-width: 860px) and (max-width: 1099px) { .tn-ret-i { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
@media (max-width: 559px) {
  /* phones: one neighbour per list is enough to read the mock-up */
  .tn-rows .tn-row:nth-child(n + 3), .tn-paa li:nth-child(3) { display: none; }
  .tn-sc-b { padding: 10px; }
  .tn-foot { padding-inline: 2px; }
}
@media (max-width: 859px) {
  .tn-screens { position: relative; padding-top: 22px; }
  .tn-screens::before { content: ""; position: absolute; left: calc(50% - 1px); top: -22px; width: 2px; height: 36px; background: var(--forest); }
  .tn-screen--r { margin-top: 6px; }
  .tn-q-t { font-size: 15px; }
}

/* intro: the question, the fork, then the zones light up one by one on the left while the answer is written
   on the right, "your page" is marked, and the reading keys follow; the assistant's cursor keeps blinking */
.js .vz-figure .tn-q { opacity: 0; transform: translateY(-6px); transition: opacity .4s ease .05s, transform .45s ease .05s; }
.js .vz-figure .tn-fork-c { transform: scaleY(0); transition: transform .25s ease .35s; }
.js .vz-figure .tn-fork-h { transform: scaleX(0); transition: transform .35s ease .55s; }
.js .vz-figure .tn-fork-l, .js .vz-figure .tn-fork-r { transform: scaleY(0); transition: transform .25s ease .85s; }
.js .vz-figure .tn-screens::before { transform: scaleY(0); transform-origin: top; transition: transform .4s ease .35s; }
.js .vz-figure .tn-screen { opacity: 0; transform: translateY(10px); transition: opacity .45s ease .95s, transform .5s cubic-bezier(.2, .7, .2, 1) .95s; }
.js .vz-figure .tn-z { opacity: 0; transition: opacity .4s ease; }
.js .vz-figure .tn-z--1 { transition-delay: 1.2s; } .js .vz-figure .tn-z--2 { transition-delay: 1.35s; } .js .vz-figure .tn-z--3 { transition-delay: 1.5s; }
.js .vz-figure .tn-z--4 { transition-delay: 1.65s; } .js .vz-figure .tn-z--5 { transition-delay: 1.8s; }
.js .vz-figure .tn-bub--a { opacity: 0; transition: opacity .4s ease 1.3s; }
.js .vz-figure .tn-s { opacity: 0; transition: opacity .5s ease; }
.js .vz-figure .tn-s--1 { transition-delay: 1.45s; } .js .vz-figure .tn-s--2 { transition-delay: 1.8s; } .js .vz-figure .tn-s--3 { transition-delay: 2.15s; }
.js .vz-figure .tn-src-l, .js .vz-figure .tn-srcs { opacity: 0; transition: opacity .45s ease 2.4s; }
.js .vz-figure .tn-hit { background: transparent; box-shadow: 0 0 0 1.5px transparent; transition: background-color .5s ease 2.55s, box-shadow .5s ease 2.55s; }
.js .vz-figure .tn-you { opacity: 0; transition: opacity .4s ease 2.65s; }
.js .vz-figure .tn-foot { opacity: 0; transition: opacity .4s ease 2.5s; }
.js .vz-figure .tn-ret-i, .js .vz-figure .tn-lev { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.js .vz-figure .tn-ret-i--1 { transition-delay: 2.6s; } .js .vz-figure .tn-ret-i--2 { transition-delay: 2.68s; } .js .vz-figure .tn-ret-i--3 { transition-delay: 2.76s; }
.js .vz-figure .tn-ret-i--4 { transition-delay: 2.84s; } .js .vz-figure .tn-ret-i--5 { transition-delay: 2.92s; } .js .vz-figure .tn-lev { transition-delay: 3s; }
.js .vz-figure.is-visible .tn-q, .js .vz-figure.is-visible .tn-screen, .js .vz-figure.is-visible .tn-foot, .js .vz-figure.is-visible .tn-ret-i, .js .vz-figure.is-visible .tn-lev { opacity: 1; transform: none; }
.js .vz-figure.is-visible .tn-fork i { transform: none; }
.js .vz-figure.is-visible .tn-screens::before { transform: none; }
.js .vz-figure.is-visible .tn-z, .js .vz-figure.is-visible .tn-bub--a, .js .vz-figure.is-visible .tn-s, .js .vz-figure.is-visible .tn-src-l, .js .vz-figure.is-visible .tn-srcs, .js .vz-figure.is-visible .tn-you { opacity: 1; }
.js .vz-figure.is-visible .tn-hit { background: var(--mint); box-shadow: 0 0 0 1.5px var(--green-2); }
.vz-figure.is-visible .tn-cursor, html:not(.js) .tn-cursor { animation: tn-blink 1s steps(2, start) 2.5s infinite; }
@keyframes tn-blink { to { visibility: hidden; } }
