/* ---- Samples: the "Can you tell" cards filled with real media and app screens -------------------------
   Each card's screen is a .fk. Every size inside it is in em, so one font-size per breakpoint (at the end
   of this file) scales a whole screen with its card: 260 px on desktop, 148 px on phones. */

/* the card and its screen each paint as one unit, so nothing inside a screen (a playing video, the call
   controls) can rise above the real or fake buttons */
.lanes .card {
  isolation: isolate;
}

.fk {
  --sys: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.6em;
  background: #fff;
  color: #0f1419;
  font-family: var(--sys);
  font-size: 7.4px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.fk svg {
  flex: none;
}

.fk .ic {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fk .solid {
  fill: currentColor;
  stroke: none;
}

.fk-av {
  flex: none;
  width: 2.7em;
  height: 2.7em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 1em;
}

.fk-av > svg {
  width: 72%;
  height: 72%;
  margin-top: 18%;
  fill: #fff;
}

.fk-mut {
  color: #65676b;
}

.fk-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-width: 0;
}

.fk-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fk-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}


/* ---- Video and portrait: the file, cropped to the card ------------------------------------------------ */

.fk-vid,
.fk-photo {
  background: #000;
  border-radius: 0.3em;
}

.fk-vid video,
.fk-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fk-dur {
  position: absolute;
  right: 0.7em;
  bottom: 0.7em;
  padding: 0.2em 0.5em;
  border-radius: 0.3em;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1em;
  font-variant-numeric: tabular-nums;
}


/* ---- Messages: a received text ------------------------------------------------------------------------ */

.fk-sms {
  padding-bottom: 0.8em;
}

.fk-sms-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  padding: 0.8em 0 0.6em;
  border-bottom: 1px solid #e5e5ea;
  background: #f6f6f8;
  font-size: 0.95em;
}

.fk-sms-top .fk-av {
  background: linear-gradient(#a6abb4, #868b94);
  font-size: 1.05em;
}

.fk-sms-meta {
  margin: 0.8em 0 0.5em;
  text-align: center;
  color: #8e8e93;
  font-size: 0.85em;
}

.fk-bub {
  align-self: flex-start;
  max-width: 82%;
  margin-left: 0.7em;
  padding: 0.55em 0.85em;
  border-radius: 1.3em;
  background: #e9e9eb;
  color: #000;
  font-size: 1.12em;
  line-height: 1.3;
}

.fk-bub u {
  color: #0a5cc2;
}


/* ---- Email: an opened message ------------------------------------------------------------------------- */

.fk-mail {
  padding: 0.9em;
  gap: 0.7em;
}

.fk-warn {
  display: flex;
  gap: 0.45em;
  align-items: flex-start;
  padding: 0.45em 0.6em;
  border-radius: 0.4em;
  background: #fef7e0;
  color: #5c4500;
  font-size: 0.88em;
}

.fk-subj {
  font-size: 1.22em;
  font-weight: 500;
  line-height: 1.25;
  color: #1f1f1f;
}

.fk-mail .fk-av {
  width: 2.5em;
  height: 2.5em;
}

.fk-from {
  flex: 1;
  font-size: 0.95em;
}

.fk-from b,
.fk-from .fk-mut {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fk-from b {
  font-weight: 600;
}

.fk-from .fk-mut,
.fk-mail .fk-time {
  color: #5e5e5e;
  font-size: 0.92em;
}

.fk-mail .fk-time {
  align-self: flex-start;
  white-space: nowrap;
}

.fk-text {
  color: #3c4043;
  font-size: 1em;
  line-height: 1.4;
}

.fk-btn {
  align-self: flex-start;
  padding: 0.5em 0.9em;
  border-radius: 0.35em;
  background: #1a73e8;
  color: #fff;
  font-weight: 600;
  font-size: 0.95em;
}

.fk-chip {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.65em;
  border: 1px solid #dadce0;
  border-radius: 0.45em;
  font-size: 0.95em;
  color: #1f1f1f;
}


/* ---- Posts: three feeds ------------------------------------------------------------------------------- */

.fk-post {
  padding: 0.9em 0.9em 0;
  gap: 0.65em;
}

.fk-post .fk-name {
  font-weight: 600;
  font-size: 1.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fk-post .fk-meta {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.88em;
  color: #65676b;
}

.fk-post .fk-meta .ic {
  width: 1em;
  height: 1em;
}

.fk-post .fk-body {
  font-size: 1.12em;
  line-height: 1.35;
}

.fk-counts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #65676b;
  font-size: 0.88em;
}

.fk-react {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.fk-react i {
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
}

.fk-react i .ic {
  width: 0.8em;
  height: 0.8em;
}

.fk-react i + i {
  margin-left: -0.55em;
  box-shadow: 0 0 0 0.12em #fff;
}

.fk-acts {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 0.55em 0 0.65em;
  border-top: 1px solid #e4e6eb;
  color: #65676b;
  font-size: 0.9em;
  font-weight: 600;
}

.fk-acts span {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

/* the professional network: a headline under the name and a follow link */
.fk-li .fk-meta {
  color: #666;
}

.fk-follow {
  margin-left: auto;
  align-self: flex-start;
  color: #0a66c2;
  font-weight: 600;
  font-size: 0.95em;
  white-space: nowrap;
}

/* the microblog: avatar in its own column, the post beside it */
.fk-x {
  flex-direction: row;
  gap: 0.6em;
  padding: 0.9em;
}

.fk-x .fk-col {
  flex: 1;
  gap: 0.45em;
}

.fk-x .fk-head {
  display: flex;
  align-items: center;
  gap: 0.25em;
  min-width: 0;
  font-size: 0.98em;
}

.fk-x .fk-head b {
  white-space: nowrap;
}

.fk-x .fk-head .fk-mut {
  color: #536471;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fk-badge {
  width: 1.15em;
  height: 1.15em;
}

.fk-card {
  border: 1px solid #cfd9de;
  border-radius: 0.8em;
  overflow: hidden;
  font-size: 0.92em;
}

.fk-card-img {
  height: 3.6em;
  background: linear-gradient(135deg, #3c3c3d, #627eea 60%, #8a92b2);
}

.fk-card div:last-child {
  padding: 0.4em 0.6em;
  color: #536471;
}

.fk-x .fk-acts {
  margin-top: auto;
  padding: 0;
  border: 0;
  justify-content: space-between;
  color: #536471;
  font-weight: 400;
}


/* ---- Video calls -------------------------------------------------------------------------------------- */

/* one to one: the caller full frame, yourself in the corner */
.fk-ft {
  background: #1c1c1e;
}

.fk-ft > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fk-ft::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 32%;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
}

.fk-ft-name {
  z-index: 2;
  position: absolute;
  left: 0.8em;
  top: 0.7em;
  color: #fff;
  text-shadow: 0 0.05em 0.4em rgba(0, 0, 0, 0.5);
  font-size: 1.05em;
}

.fk-ft-name b {
  display: block;
  font-weight: 600;
}

.fk-self {
  z-index: 2;
  position: absolute;
  right: 0.7em;
  top: 0.7em;
  width: 26%;
  aspect-ratio: 3 / 4;
  border-radius: 0.5em;
  background: linear-gradient(#60646c, #2f3237);
  display: grid;
  place-items: end center;
  overflow: hidden;
  box-shadow: 0 0.1em 0.5em rgba(0, 0, 0, 0.35);
}

.fk-self svg {
  width: 80%;
  height: 80%;
  fill: #9ca0a8;
}

.fk-ctl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.8em;
  display: flex;
  justify-content: center;
  gap: 0.7em;
}

.fk-ctl i {
  width: 2.7em;
  height: 2.7em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(60, 60, 67, 0.72);
}

.fk-ctl i.end {
  background: #ff3b30;
}

/* a group call with cameras off */
.fk-meet {
  background: #202124;
  color: #e8eaed;
  padding: 0.4em;
  gap: 0.4em;
}

.fk-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.4em;
}

.fk-tile {
  position: relative;
  border-radius: 0.5em;
  background: #3c4043;
  display: grid;
  place-items: center;
}

.fk-tile.talk {
  box-shadow: inset 0 0 0 0.18em #8ab4f8;
}

.fk-tile .fk-av {
  width: 2.9em;
  height: 2.9em;
  font-size: 1.05em;
}

.fk-tile > .fk-nm {
  position: absolute;
  left: 0.5em;
  bottom: 0.35em;
  font-size: 0.85em;
  white-space: nowrap;
}

.fk-tile > .ic {
  position: absolute;
  right: 0.45em;
  top: 0.45em;
  width: 1.05em;
  height: 1.05em;
}

.fk-bar {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  padding: 0.1em 0 0.15em;
}

.fk-bar i {
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #3c4043;
  color: #e8eaed;
}

.fk-bar i.off {
  background: #ea4335;
  color: #fff;
}

.fk-bar i.end {
  width: 3.4em;
  border-radius: 1.2em;
  background: #ea4335;
  color: #fff;
}


/* ---- Voice: the site's own waveform and caption; a click anywhere on the card plays the clip ---------- */

.card-voice {
  cursor: pointer;
}

.fk-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.fk-hit:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: -2px;
}

/* once a clip has started, the waveform fills with the accent as it plays */
.fk-pg {
  display: none;
  stroke: var(--acc);
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
}

.fk-au.played .fk-pg {
  display: inline;
}

.fk-au.played svg path:first-child {
  stroke: var(--sq) !important;
}


/* ---- Real or fake: two buttons along the bottom of a card on hover (a tap on phones), then the verdict,
   which stays (fakes.js) --------------------------------------------------------------------------------- */

.fk-pick,
.fk-res {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  box-sizing: border-box;
}

.fk-pick {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: var(--card);
  opacity: 0;
  pointer-events: none;
  /* a 3D transform keeps the strip on its own GPU layer for good: a playing video is on one too, and
     WebKit only stacks the two by z-index when both are. The verdict below does the same. */
  transform: translate3d(0, 6px, 0);
  will-change: transform, opacity;
  transition: opacity .2s ease, transform .2s ease;
}

/* hover only where there is a real pointer: a tap sets :hover before the browser hit-tests it, so the
   buttons would turn live under the finger and take the first tap. Phones use the held card (phone.js). */
@media (hover: hover) {
  .card:hover .fk-pick {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }
}

.card:focus-within .fk-pick,
.r .card.on .fk-pick {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.fk-pick button {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  flex: 1;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--g);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.fk-pick button:hover,
.fk-pick button:focus-visible {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--onacc);
  outline: none;
}

.fk-res {
  display: none;
  transform: translate3d(0, 0, 0);
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card.answered .fk-pick {
  display: none;
}

.card.answered .fk-res {
  display: flex;
}

.card.right .fk-res {
  background: var(--acc);
  color: var(--onacc);
}

.card.wrong .fk-res {
  background: var(--ink);
  color: var(--g);
}

@media (prefers-reduced-motion: reduce) {
  .fk-pick,
  .fk-pick button {
    transition: none;
  }
}


/* ---- Card sizes: desktop cards are 260 px, phone cards 148 px ----------------------------------------- */

@media (min-width: 761px) {
  .fk {
    font-size: 11.2px;
  }

  .fk-pick {
    gap: 8px;
    padding: 12px;
  }

  .fk-pick button {
    height: 44px;
    font-size: 13px;
  }

  .fk-res {
    height: 52px;
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .fk {
    font-size: 6.6px;
  }

  .fk-pick button {
    height: 34px;
  }

  /* a 148 px card: keep the parts a glance needs */
  .fk-warn,
  .fk-follow {
    display: none;
  }

  .fk-text {
    -webkit-line-clamp: 2;
  }
}
