/* One screen at three levels of fidelity (includes/visuals/fidelity.php) */
.fd-rail { position: relative; display: flex; justify-content: space-between; gap: 24px; margin: 0 0 26px; padding-bottom: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fd-rail span:last-child { color: var(--green-text); text-align: right; }
.fd-rail::before { content: ""; position: absolute; left: 0; right: 8px; bottom: 0; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #cfcac2 0%, var(--sage) 45%, var(--green-2) 100%); }
.fd-rail::after { content: ""; position: absolute; right: 0; bottom: -4px; border: 6px solid transparent; border-right: 0; border-left: 10px solid var(--green-2); }

.fd-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.fd-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px; border-radius: var(--radius); background: var(--paper); }
.section--paper .fd-card { background: var(--white); }
.fd-card:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -30px; width: 14px; height: 14px; margin-left: -7px;
  border-right: 2.5px solid var(--forest); border-bottom: 2.5px solid var(--forest); transform: rotate(45deg);
}
.fd-top { display: flex; align-items: center; gap: 10px; margin: 0; }
.fd-num { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--green-text); }
.fd-level { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.3; background: var(--white); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.section--paper .fd-level { background: var(--paper); box-shadow: none; }
.fd-card--2 .fd-level { background: var(--mint); color: var(--forest); box-shadow: none; }
.fd-card--3 .fd-level { background: var(--forest); color: var(--green); box-shadow: none; }
.fd-name { margin: 8px 0 16px; font-family: var(--font-serif); font-size: 25px; font-weight: 500; line-height: 1.15; color: var(--forest); }

/* mini screen */
.fd-screen { position: relative; overflow: hidden; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(12, 43, 21, .3); font-family: var(--font-sans); }
:where(.fd-screen, .fd-body) > span { display: block; }
.fd-bar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--forest); }
.fd-logo { width: 14px; height: 14px; border-radius: 4px; background: var(--green); flex: none; }
.fd-apptitle { font-size: 12.5px; font-weight: 600; color: var(--white); }
.fd-me { width: 18px; height: 18px; margin-left: auto; border-radius: 50%; background: var(--sage); flex: none; }
.fd-body { position: relative; padding: 14px; }
.fd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 28px; }
.fd-h { font-size: 14px; font-weight: 600; color: var(--forest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fd-btn { position: relative; display: grid; place-items: center; flex: none; width: 84px; height: 28px; border-radius: 7px; background: var(--green); color: var(--forest); font-size: 12px; font-weight: 700; white-space: nowrap; }
.fd-search { display: flex; align-items: center; gap: 8px; height: 28px; margin-top: 10px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); }
.fd-glass { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #7d8a80; flex: none; }
.fd-ph { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-list { display: grid; gap: 6px; margin-top: 10px; }
.fd-item { position: relative; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 9px; border-radius: 7px; border: 1px solid #ece8e2; }
.fd-item > span { position: relative; z-index: 1; }
.fd-av { width: 22px; height: 22px; border-radius: 50%; background: var(--sage); flex: none; }
.fd-item--2 .fd-av { background: var(--green-2); }
.fd-item--3 .fd-av { background: #cfcac2; }
.fd-it { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.fd-iname, .fd-isub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.fd-iname { font-size: 12.5px; font-weight: 600; color: var(--forest); }
.fd-isub { font-size: 12px; color: var(--ink-2); }
.fd-st { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.fd-st--a { background: var(--green); color: var(--forest); }
.fd-st--b { background: var(--paper); color: var(--ink-2); }
.fd-st--c { background: var(--mint); color: var(--forest); }

/* wireframe: greys, outlines, skeleton text */
.fd-screen--wire { box-shadow: none; border: 1.5px solid #cfcac2; }
.fd-screen--wire .fd-bar { background: var(--white); border-bottom: 1.5px dashed #cfcac2; }
.fd-screen--wire .fd-logo { background: #e1ddd6; }
.fd-screen--wire .fd-me { background: none; box-shadow: inset 0 0 0 1.5px #cfcac2; }
.fd-screen--wire .fd-btn { background: none; box-shadow: inset 0 0 0 1.5px #b9b3aa; }
.fd-screen--wire .fd-search { border: 1.5px dashed #cfcac2; }
.fd-screen--wire .fd-glass { border-color: #cfcac2; }
.fd-screen--wire .fd-item { border: 1.5px dashed #d9d5cf; }
.fd-screen--wire .fd-av { background: #e8e4de; }
.fd-sk { display: block; height: 7px; border-radius: 4px; background: #e1ddd6; }
.fd-sk.fd-apptitle { width: 54px; }
.fd-sk.fd-h { width: 46%; height: 10px; background: #cfcac2; }
.fd-sk-btn { width: 44px; }
.fd-sk.fd-ph { width: 52%; }
.fd-sk.fd-iname { width: 62%; height: 8px; background: #d4cfc8; }
.fd-sk.fd-isub { width: 40%; margin-top: 6px; }
.fd-sk-st { width: 54px; height: 16px; background: #ece8e2; }

/* prototype: hover state, cursor, click, toast */
.fd-screen--proto .fd-item--2::before { content: ""; position: absolute; inset: -1px; z-index: 0; border-radius: 7px; background: var(--mint); box-shadow: inset 0 0 0 1.5px var(--green-2); }
.fd-cursor { position: absolute; right: 100px; top: 150px; z-index: 3; width: 16px; height: 22px; }
.fd-cursor svg { display: block; width: 16px; height: 22px; overflow: visible; }
.fd-cursor path { fill: var(--ink); stroke: var(--white); stroke-width: 1.3; stroke-linejoin: round; }
.fd-toast { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: var(--forest); color: var(--white); font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 22px -10px rgba(12, 43, 21, .5); }
.fd-check { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--green); flex: none; }
.fd-check::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid var(--forest); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fd-states { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.fd-state { padding: 3px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--forest); font-size: 12.5px; font-weight: 600; line-height: 1.3; background: var(--forest); color: var(--green); }

/* meta */
.fd-meta { margin: 18px 0 0; display: grid; gap: 12px; }
.fd-meta dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-text); }
.fd-meta dd { margin: 3px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.fd-meta .fd-q { font-family: var(--font-serif); font-size: 17px; line-height: 1.35; color: var(--forest); }

@media (min-width: 900px) {
  .fd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .fd-card:not(:last-child)::after { left: auto; right: -27px; top: 50%; bottom: auto; margin: -7px 0 0; transform: rotate(-45deg); }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .fd-cards { gap: 32px; }
  .fd-card { padding: 16px 14px; }
  .fd-card:not(:last-child)::after { right: -23px; }
  .fd-body { padding: 12px; }
  .fd-item { gap: 7px; padding: 0 7px; }
  .fd-av { width: 18px; height: 18px; }
  .fd-st { padding: 2px 6px; }
  .fd-cursor { right: 96px; top: 146px; }
  .fd-toast { left: 12px; right: 12px; }
}
@media (max-width: 899px) { .fd-rail { display: none; } }

/* animation: the rail fills, the cards arrive one after the other, then the prototype plays in a loop */
.js .vz-figure .fd-rail::before { transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.3, .6, .3, 1) .2s; }
.js .vz-figure .fd-rail::after { opacity: 0; transition: opacity .3s ease 1.7s; }
.js .vz-figure .fd-card, .js .vz-figure .fd-rail span { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .vz-figure .fd-card--2 { transition-delay: .55s; }
.js .vz-figure .fd-card--3 { transition-delay: 1.1s; }
.js .vz-figure .fd-rail span:last-child { transition-delay: 1.3s; }
.js .vz-figure .fd-card::after { opacity: 0; transition: opacity .4s ease; }
.js .vz-figure .fd-card--1::after { transition-delay: .5s; }
.js .vz-figure .fd-card--2::after { transition-delay: 1.05s; }
.js .vz-figure.is-visible .fd-rail::before { transform: none; }
.js .vz-figure.is-visible .fd-rail::after, .js .vz-figure.is-visible .fd-card::after { opacity: 1; }
.js .vz-figure.is-visible .fd-card, .js .vz-figure.is-visible .fd-rail span { opacity: 1; transform: none; }
.js .vz-figure.is-visible .fd-screen--proto .fd-item--2::before { animation: fd-hover 6s ease 2s infinite; }
.js .vz-figure.is-visible .fd-cursor { animation: fd-cursor 6s ease-in-out 2s infinite; }
.js .vz-figure.is-visible .fd-screen--proto .fd-btn { animation: fd-press 6s ease 2s infinite; }
.js .vz-figure.is-visible .fd-toast { animation: fd-toast 6s ease 2s infinite; }
.js .vz-figure.is-visible .fd-state--1 { animation: fd-s1 6s ease 2s infinite; }
.js .vz-figure.is-visible .fd-state--2 { animation: fd-s2 6s ease 2s infinite; }
.js .vz-figure.is-visible .fd-state--3 { animation: fd-s3 6s ease 2s infinite; }
@keyframes fd-hover { 0%, 30% { opacity: 1; } 38%, 100% { opacity: 0; } }
@keyframes fd-cursor {
  0%, 22% { transform: translate(0, 0); }
  40% { transform: translate(52px, -128px); }
  44% { transform: translate(52px, -128px) scale(.82); }
  48%, 80% { transform: translate(52px, -128px); }
  96%, 100% { transform: translate(0, 0); }
}
@keyframes fd-press { 0%, 42% { transform: none; background: var(--green); } 45% { transform: scale(.92); background: var(--green-2); } 50%, 100% { transform: none; background: var(--green); } }
@keyframes fd-toast { 0%, 48% { opacity: 0; transform: translateY(14px); } 54%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(14px); } }
/* idle chip: outlined, readable; active chip: forest */
@keyframes fd-s1 { 0%, 32% { background: var(--forest); color: var(--green); } 38%, 100% { background: transparent; color: var(--ink-2); } }
@keyframes fd-s2 { 0%, 38% { background: transparent; color: var(--ink-2); } 42%, 52% { background: var(--forest); color: var(--green); } 58%, 100% { background: transparent; color: var(--ink-2); } }
@keyframes fd-s3 { 0%, 50% { background: transparent; color: var(--ink-2); } 55%, 86% { background: var(--forest); color: var(--green); } 92%, 100% { background: transparent; color: var(--ink-2); } }
